diff options
Diffstat (limited to 'actionview/test/template/form_helper')
-rw-r--r-- | actionview/test/template/form_helper/form_with_test.rb | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/actionview/test/template/form_helper/form_with_test.rb b/actionview/test/template/form_helper/form_with_test.rb index d62edf5dd9..cbfe97159d 100644 --- a/actionview/test/template/form_helper/form_with_test.rb +++ b/actionview/test/template/form_helper/form_with_test.rb @@ -17,7 +17,7 @@ class FormWithActsLikeFormTagTest < FormWithTest method = options[:method] skip_enforcing_utf8 = options.fetch(:skip_enforcing_utf8, false) - "".tap do |txt| + "".dup.tap do |txt| unless skip_enforcing_utf8 txt << %{<input name="utf8" type="hidden" value="✓" />} end @@ -33,7 +33,7 @@ class FormWithActsLikeFormTagTest < FormWithTest method = method.to_s == "get" ? "get" : "post" - txt = %{<form accept-charset="UTF-8" action="#{action}"} + txt = %{<form accept-charset="UTF-8" action="#{action}"}.dup txt << %{ enctype="multipart/form-data"} if enctype txt << %{ data-remote="true"} unless local txt << %{ class="#{html_class}"} if html_class @@ -2195,9 +2195,9 @@ class FormWithActsLikeFormForTest < FormWithTest method = options[:method] if options.fetch(:skip_enforcing_utf8, false) - txt = "" + txt = "".dup else - txt = %{<input name="utf8" type="hidden" value="✓" />} + txt = %{<input name="utf8" type="hidden" value="✓" />}.dup end if method && !%w(get post).include?(method.to_s) @@ -2208,7 +2208,7 @@ class FormWithActsLikeFormForTest < FormWithTest end def form_text(action = "/", id = nil, html_class = nil, local = 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"} unless local txt << %{ class="#{html_class}"} if html_class |