Module: GettextTestLog
Constant Summary collapse
- SEPERATOR =
"\nNEXT-WORD\n"
Instance Method Summary collapse
-
#activate_test_logging ⇒ Object
call this inside your spec_helper.rb to activate test message storage.
-
#write_test_log(storage_file, options = {}) ⇒ Object
write to a given file, which msgids where found in the ‘rake updatepo` recogniseable format _(“msgid”).
Instance Method Details
#activate_test_logging ⇒ Object
call this inside your spec_helper.rb to activate test message storage
17 18 19 20 21 22 23 24 25 26 27 28 29 |
# File 'lib/gettext_test_log.rb', line 17 def activate_test_logging if ENV['LOG_GETTEXT'] require 'gettext_test_log/fast_gettext_stub' Spec::Runner.configure do |config| #TODO only call after the 'last' test was executed config.after(:all) do File.open(ENV['LOG_GETTEXT'],'w') do |f| f.puts FastGettext::Translation::TRANSLATIONS_USED * SEPERATOR end end end end end |
#write_test_log(storage_file, options = {}) ⇒ Object
write to a given file, which msgids where found in the ‘rake updatepo` recogniseable format _(“msgid”)
7 8 9 10 11 12 13 |
# File 'lib/gettext_test_log.rb', line 7 def write_test_log(storage_file,={}) = if excluded = [:exclude_msgids_in_po_files] -= msgids_in_po_files(excluded) end (,storage_file) end |