diff options
| author | hukl <contact@smyck.org> | 2010-01-14 22:21:43 +0100 |
|---|---|---|
| committer | hukl <contact@smyck.org> | 2010-01-14 22:21:43 +0100 |
| commit | 57d1382013c85a7b11ac8ce5e683f6006b12b328 (patch) | |
| tree | 19646c4fa5952fa1cf0a2c874952affa346373f1 /vendor/plugins/globalize2/test/i18n | |
| parent | 1b86bf5f2e35d1820bfa32d979bcc2d9ff9a9a8e (diff) | |
Updated globalize2 to latest version. Modified existing code accoringly
Diffstat (limited to 'vendor/plugins/globalize2/test/i18n')
| -rw-r--r-- | vendor/plugins/globalize2/test/i18n/missing_translations_test.rb | 12 |
1 files changed, 6 insertions, 6 deletions
diff --git a/vendor/plugins/globalize2/test/i18n/missing_translations_test.rb b/vendor/plugins/globalize2/test/i18n/missing_translations_test.rb index 8641d57f..5d0ecd6f 100644 --- a/vendor/plugins/globalize2/test/i18n/missing_translations_test.rb +++ b/vendor/plugins/globalize2/test/i18n/missing_translations_test.rb | |||
| @@ -1,5 +1,5 @@ | |||
| 1 | require File.join( File.dirname(__FILE__), '..', 'test_helper' ) | 1 | require File.dirname(__FILE__) + '/../test_helper' |
| 2 | require 'globalize/i18n/missing_translations_log_handler' | 2 | require 'i18n/missing_translations_log_handler' |
| 3 | 3 | ||
| 4 | class MissingTranslationsTest < ActiveSupport::TestCase | 4 | class MissingTranslationsTest < ActiveSupport::TestCase |
| 5 | test "defines I18n.missing_translations_logger accessor" do | 5 | test "defines I18n.missing_translations_logger accessor" do |
| @@ -19,18 +19,18 @@ class LogMissingTranslationsTest < ActiveSupport::TestCase | |||
| 19 | def setup | 19 | def setup |
| 20 | @locale, @key, @options = :en, :foo, {} | 20 | @locale, @key, @options = :en, :foo, {} |
| 21 | @exception = I18n::MissingTranslationData.new(@locale, @key, @options) | 21 | @exception = I18n::MissingTranslationData.new(@locale, @key, @options) |
| 22 | 22 | ||
| 23 | @logger = TestLogger.new | 23 | @logger = TestLogger.new |
| 24 | I18n.missing_translations_logger = @logger | 24 | I18n.missing_translations_logger = @logger |
| 25 | end | 25 | end |
| 26 | 26 | ||
| 27 | test "still returns the exception message for MissingTranslationData exceptions" do | 27 | test "still returns the exception message for MissingTranslationData exceptions" do |
| 28 | result = I18n.send(:missing_translations_log_handler, @exception, @locale, @key, @options) | 28 | result = I18n.send(:missing_translations_log_handler, @exception, @locale, @key, @options) |
| 29 | assert_equal 'translation missing: en, foo', result | 29 | assert_equal 'translation missing: en, foo', result |
| 30 | end | 30 | end |
| 31 | 31 | ||
| 32 | test "logs the missing translation to I18n.missing_translations_logger" do | 32 | test "logs the missing translation to I18n.missing_translations_logger" do |
| 33 | I18n.send(:missing_translations_log_handler, @exception, @locale, @key, @options) | 33 | I18n.send(:missing_translations_log_handler, @exception, @locale, @key, @options) |
| 34 | assert_equal 'translation missing: en, foo', @logger | 34 | assert_equal 'translation missing: en, foo', @logger |
| 35 | end | 35 | end |
| 36 | end | 36 | end |
