aboutsummaryrefslogtreecommitdiffstats
path: root/actionview
diff options
context:
space:
mode:
authorYves Senn <yves.senn@gmail.com>2014-02-24 19:31:23 +0100
committerYves Senn <yves.senn@gmail.com>2014-02-24 19:31:23 +0100
commit947b3cbaa2f07aabd2ee9178643ab983af2a8de8 (patch)
tree4ff7329456cd54df53c2310cccb2fb021e93f4e8 /actionview
parentf2577ca89f91204ee98850d89adec5263265cb7d (diff)
downloadrails-947b3cbaa2f07aabd2ee9178643ab983af2a8de8.tar.gz
rails-947b3cbaa2f07aabd2ee9178643ab983af2a8de8.tar.bz2
rails-947b3cbaa2f07aabd2ee9178643ab983af2a8de8.zip
refactor, with_locale is not needed because I18n is mocked.
This is a follow up to #14170. While backporting I recognized that this call is not needed at all.
Diffstat (limited to 'actionview')
-rw-r--r--actionview/test/template/form_helper_test.rb12
1 files changed, 5 insertions, 7 deletions
diff --git a/actionview/test/template/form_helper_test.rb b/actionview/test/template/form_helper_test.rb
index 9f6cbd3a74..b5e9801776 100644
--- a/actionview/test/template/form_helper_test.rb
+++ b/actionview/test/template/form_helper_test.rb
@@ -2391,15 +2391,13 @@ class FormHelperTest < ActionView::TestCase
end
def test_nested_fields_label_translation_with_more_than_10_records
- with_locale(:locale) do
- @post.comments = Array.new(11) { |id| Comment.new(id + 1) }
+ @post.comments = Array.new(11) { |id| Comment.new(id + 1) }
- I18n.expects(:t).with('post.comments.body', default: [:"comment.body", ''], scope: "helpers.label").times(11).returns "Write body here"
+ I18n.expects(:t).with('post.comments.body', default: [:"comment.body", ''], scope: "helpers.label").times(11).returns "Write body here"
- form_for(@post) do |f|
- f.fields_for(:comments) do |cf|
- concat cf.label(:body)
- end
+ form_for(@post) do |f|
+ f.fields_for(:comments) do |cf|
+ concat cf.label(:body)
end
end
end