Skip to content

Commit

Permalink
Fix assertion order and ✂️ extra spaces
Browse files Browse the repository at this point in the history
  • Loading branch information
carlosantoniodasilva committed May 13, 2014
1 parent f0f7c4f commit c4c5801
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 4 deletions.
3 changes: 1 addition & 2 deletions actionview/lib/action_view/helpers/translation_helper.rb
Expand Up @@ -7,7 +7,7 @@ module Helpers
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,
Expand Down Expand Up @@ -35,7 +35,6 @@ module TranslationHelper
# 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
Expand Down
4 changes: 2 additions & 2 deletions actionview/test/template/translation_helper_test.rb
Expand Up @@ -152,9 +152,9 @@ def test_translate_with_array_of_string_defaults
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

0 comments on commit c4c5801

Please sign in to comment.