diff options
Diffstat (limited to 'actionview/test/template/form_helper_test.rb')
-rw-r--r-- | actionview/test/template/form_helper_test.rb | 14 |
1 files changed, 7 insertions, 7 deletions
diff --git a/actionview/test/template/form_helper_test.rb b/actionview/test/template/form_helper_test.rb index b3a180b28a..b24f9ed3f0 100644 --- a/actionview/test/template/form_helper_test.rb +++ b/actionview/test/template/form_helper_test.rb @@ -2893,7 +2893,7 @@ class FormHelperTest < ActionView::TestCase expected = 0 @post.comments.each do |comment| f.fields_for(:comments, comment) { |cf| - assert_equal cf.index, expected + assert_equal expected, cf.index expected += 1 } end @@ -2907,7 +2907,7 @@ class FormHelperTest < ActionView::TestCase expected = 0 @post.comments.each do |comment| f.fields_for(:comments, comment) { |cf| - assert_equal cf.index, expected + assert_equal expected, cf.index expected += 1 } end @@ -2920,7 +2920,7 @@ class FormHelperTest < ActionView::TestCase form_for(@post) do |f| expected = 0 f.fields_for(:comments, @post.comments) { |cf| - assert_equal cf.index, expected + assert_equal expected, cf.index expected += 1 } end @@ -2931,7 +2931,7 @@ class FormHelperTest < ActionView::TestCase form_for(@post) do |f| f.fields_for(:comments, Comment.new(321), child_index: "abc") { |cf| - assert_equal cf.index, "abc" + assert_equal "abc", cf.index } end end @@ -3446,9 +3446,9 @@ class FormHelperTest < ActionView::TestCase method = options[:method] if options.fetch(:enforce_utf8, true) - txt = %{<input name="utf8" type="hidden" value="✓" />} + txt = %{<input name="utf8" type="hidden" value="✓" />}.dup else - txt = "" + txt = "".dup end if method && !%w(get post).include?(method.to_s) @@ -3459,7 +3459,7 @@ class FormHelperTest < ActionView::TestCase end def form_text(action = "/", id = nil, html_class = nil, remote = nil, multipart = nil, method = nil) - txt = %{<form accept-charset="UTF-8" action="#{action}"} + txt = %{<form accept-charset="UTF-8" action="#{action}"}.dup txt << %{ enctype="multipart/form-data"} if multipart txt << %{ data-remote="true"} if remote txt << %{ class="#{html_class}"} if html_class |