diff options
author | Carlos Antonio da Silva <carlosantoniodasilva@gmail.com> | 2014-05-13 12:09:11 -0300 |
---|---|---|
committer | Carlos Antonio da Silva <carlosantoniodasilva@gmail.com> | 2014-05-13 12:09:11 -0300 |
commit | c4c5801bd9ded4c23c1e35f6a4d991f1d16db113 (patch) | |
tree | de32d277615c20da80ea67402504ba40b52a1dcd /actionview | |
parent | f0f7c4ff96ad8223430e9ee13ca1bb25732e13e7 (diff) | |
download | rails-c4c5801bd9ded4c23c1e35f6a4d991f1d16db113.tar.gz rails-c4c5801bd9ded4c23c1e35f6a4d991f1d16db113.tar.bz2 rails-c4c5801bd9ded4c23c1e35f6a4d991f1d16db113.zip |
Fix assertion order and :scissors: extra spaces
Diffstat (limited to 'actionview')
-rw-r--r-- | actionview/lib/action_view/helpers/translation_helper.rb | 3 | ||||
-rw-r--r-- | actionview/test/template/translation_helper_test.rb | 4 |
2 files changed, 3 insertions, 4 deletions
diff --git a/actionview/lib/action_view/helpers/translation_helper.rb b/actionview/lib/action_view/helpers/translation_helper.rb index eac9279855..17ec6a40bf 100644 --- a/actionview/lib/action_view/helpers/translation_helper.rb +++ b/actionview/lib/action_view/helpers/translation_helper.rb @@ -7,7 +7,7 @@ module ActionView module TranslationHelper # Delegates to <tt>I18n#translate</tt> but also performs three additional functions. # - # First, it will ensure that any thrown +MissingTranslation+ messages will be turned + # First, it will ensure that any thrown +MissingTranslation+ messages will be turned # into inline spans that: # # * have a "translation-missing" class set, @@ -35,7 +35,6 @@ module ActionView # you know what kind of output to expect when you call translate in a template. def translate(key, options = {}) options = options.dup - options[:default] = wrap_translate_defaults(options[:default]) if options[:default] # If the user has specified rescue_format then pass it all through, otherwise use diff --git a/actionview/test/template/translation_helper_test.rb b/actionview/test/template/translation_helper_test.rb index f166668a60..a9d5ea7345 100644 --- a/actionview/test/template/translation_helper_test.rb +++ b/actionview/test/template/translation_helper_test.rb @@ -152,9 +152,9 @@ class TranslationHelperTest < ActiveSupport::TestCase assert_equal 'A Generic String', translation end - def test_translate_doesnt_change_options + def test_translate_does_not_change_options options = {} translate(:'translations.missing', options) - assert_equal options, {} + assert_equal({}, options) end end |