mirror of
https://github.com/rails/rails.git
synced 2022-11-09 12:12:34 -05:00
Fix assertion order and ✂️ extra spaces
This commit is contained in:
parent
f0f7c4ff96
commit
c4c5801bd9
2 changed files with 3 additions and 4 deletions
|
@ -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
|
||||
|
|
|
@ -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
|
||||
|
|
Loading…
Reference in a new issue