aboutsummaryrefslogtreecommitdiffstats
path: root/actionview/test/template/form_helper
diff options
context:
space:
mode:
Diffstat (limited to 'actionview/test/template/form_helper')
-rw-r--r--actionview/test/template/form_helper/form_with_test.rb10
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 ecdd5ce672..df81315b9c 100644
--- a/actionview/test/template/form_helper/form_with_test.rb
+++ b/actionview/test/template/form_helper/form_with_test.rb
@@ -16,7 +16,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="&#x2713;" />}
end
@@ -32,7 +32,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
@@ -2194,9 +2194,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="&#x2713;" />}
+ txt = %{<input name="utf8" type="hidden" value="&#x2713;" />}.dup
end
if method && !%w(get post).include?(method.to_s)
@@ -2207,7 +2207,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