Permalink
Browse files

Fix setting expected value in translation tests

It was being set to nil instead due to the wrong assignment.
  • Loading branch information...
carlosantoniodasilva committed Jan 21, 2013
1 parent e4dbfce commit 57b65ef416a4ff8269d8e7ac2c297cbdfa3d0d4b
Showing with 2 additions and 2 deletions.
  1. +2 −2 actionpack/test/abstract/translation_test.rb
@@ -29,13 +29,13 @@ def test_action_controller_base_responds_to_l
def test_lazy_lookup
expected = 'bar'
- @controller.stubs(:action_name => :index)
+ @controller.stubs(action_name: :index)
I18n.stubs(:translate).with('abstract_controller.testing.translation.index.foo').returns(expected)
assert_equal expected, @controller.t('.foo')
end
def test_default_translation
- key, expected = 'one.two' 'bar'
+ key, expected = 'one.two', 'bar'
I18n.stubs(:translate).with(key).returns(expected)
assert_equal expected, @controller.t(key)
end

0 comments on commit 57b65ef

Please sign in to comment.