aboutsummaryrefslogtreecommitdiffstats
path: root/actionpack/test
diff options
context:
space:
mode:
Diffstat (limited to 'actionpack/test')
-rw-r--r--actionpack/test/controller/caching_test.rb4
-rw-r--r--actionpack/test/controller/output_escaping_test.rb2
-rw-r--r--actionpack/test/template/erb_util_test.rb2
-rw-r--r--actionpack/test/template/form_helper_test.rb2
-rw-r--r--actionpack/test/template/form_tag_helper_test.rb6
-rw-r--r--actionpack/test/template/safe_buffer_test.rb2
-rw-r--r--actionpack/test/template/test_case_test.rb2
7 files changed, 10 insertions, 10 deletions
diff --git a/actionpack/test/controller/caching_test.rb b/actionpack/test/controller/caching_test.rb
index 8a13d1e5f1..de92fc56fd 100644
--- a/actionpack/test/controller/caching_test.rb
+++ b/actionpack/test/controller/caching_test.rb
@@ -611,7 +611,7 @@ class FragmentCachingTest < ActionController::TestCase
@store.write('views/expensive', 'fragment content')
fragment_computed = false
- buffer = 'generated till now -> '
+ buffer = 'generated till now -> '.html_safe
@controller.fragment_for(buffer, 'expensive') { fragment_computed = true }
assert fragment_computed
@@ -622,7 +622,7 @@ class FragmentCachingTest < ActionController::TestCase
@store.write('views/expensive', 'fragment content')
fragment_computed = false
- buffer = 'generated till now -> '
+ buffer = 'generated till now -> '.html_safe
@controller.fragment_for(buffer, 'expensive') { fragment_computed = true }
assert !fragment_computed
diff --git a/actionpack/test/controller/output_escaping_test.rb b/actionpack/test/controller/output_escaping_test.rb
index 7332f3f1e3..43a8c05cda 100644
--- a/actionpack/test/controller/output_escaping_test.rb
+++ b/actionpack/test/controller/output_escaping_test.rb
@@ -13,7 +13,7 @@ class OutputEscapingTest < ActiveSupport::TestCase
test "escapeHTML shouldn't touch explicitly safe strings" do
# TODO this seems easier to compose and reason about, but
# this should be verified
- assert_equal "<", ERB::Util.h("<".html_safe!)
+ assert_equal "<", ERB::Util.h("<".html_safe)
end
end
diff --git a/actionpack/test/template/erb_util_test.rb b/actionpack/test/template/erb_util_test.rb
index fa6b263965..06155b1f30 100644
--- a/actionpack/test/template/erb_util_test.rb
+++ b/actionpack/test/template/erb_util_test.rb
@@ -22,7 +22,7 @@ class ErbUtilTest < Test::Unit::TestCase
end
def test_html_escape_passes_html_escpe_unmodified
- escaped = h("<p>".html_safe!)
+ escaped = h("<p>".html_safe)
assert_equal "<p>", escaped
assert escaped.html_safe?
end
diff --git a/actionpack/test/template/form_helper_test.rb b/actionpack/test/template/form_helper_test.rb
index caeca9db10..aafc318b76 100644
--- a/actionpack/test/template/form_helper_test.rb
+++ b/actionpack/test/template/form_helper_test.rb
@@ -1170,7 +1170,7 @@ class FormHelperTest < ActionView::TestCase
(field_helpers - %w(hidden_field)).each do |selector|
src = <<-END_SRC
def #{selector}(field, *args, &proc)
- ("<label for='\#{field}'>\#{field.to_s.humanize}:</label> " + super + "<br/>").html_safe!
+ ("<label for='\#{field}'>\#{field.to_s.humanize}:</label> " + super + "<br/>").html_safe
end
END_SRC
class_eval src, __FILE__, __LINE__
diff --git a/actionpack/test/template/form_tag_helper_test.rb b/actionpack/test/template/form_tag_helper_test.rb
index 553ec44fad..3635c7548e 100644
--- a/actionpack/test/template/form_tag_helper_test.rb
+++ b/actionpack/test/template/form_tag_helper_test.rb
@@ -335,19 +335,19 @@ class FormTagHelperTest < ActionView::TestCase
expected = %(<fieldset><legend>Your details</legend>Hello world!</fieldset>)
assert_dom_equal expected, output_buffer
- self.output_buffer = ''
+ self.output_buffer = ''.html_safe
field_set_tag { concat "Hello world!" }
expected = %(<fieldset>Hello world!</fieldset>)
assert_dom_equal expected, output_buffer
- self.output_buffer = ''
+ self.output_buffer = ''.html_safe
field_set_tag('') { concat "Hello world!" }
expected = %(<fieldset>Hello world!</fieldset>)
assert_dom_equal expected, output_buffer
- self.output_buffer = ''
+ self.output_buffer = ''.html_safe
field_set_tag('', :class => 'format') { concat "Hello world!" }
expected = %(<fieldset class="format">Hello world!</fieldset>)
diff --git a/actionpack/test/template/safe_buffer_test.rb b/actionpack/test/template/safe_buffer_test.rb
index 6a18201d16..41a95e068b 100644
--- a/actionpack/test/template/safe_buffer_test.rb
+++ b/actionpack/test/template/safe_buffer_test.rb
@@ -16,7 +16,7 @@ class SafeBufferTest < ActionView::TestCase
end
test "Should NOT escape a safe value passed to it" do
- @buffer << "<script>".html_safe!
+ @buffer << "<script>".html_safe
assert_equal "<script>", @buffer
end
diff --git a/actionpack/test/template/test_case_test.rb b/actionpack/test/template/test_case_test.rb
index 9a448ce328..be2c6b3108 100644
--- a/actionpack/test/template/test_case_test.rb
+++ b/actionpack/test/template/test_case_test.rb
@@ -160,7 +160,7 @@ module ActionView
class AssertionsTest < ActionView::TestCase
def render_from_helper
form_tag('/foo') do
- concat render(:text => '<ul><li>foo</li></ul>').html_safe!
+ safe_concat render(:text => '<ul><li>foo</li></ul>')
end
end
helper_method :render_from_helper