Use assert_predicate instead

Co-authored-by: no-itsbackpack <no-itsbackpack@github.com>
This commit is contained in:
Yumin Wong 2018-09-06 12:48:50 -05:00
parent 3f5bd11ed6
commit 0a1567793b
1 changed files with 2 additions and 2 deletions

View File

@ -153,13 +153,13 @@ class SafeBufferTest < ActiveSupport::TestCase
test "Should continue safe on slice" do
x = "<div>foo</div>".html_safe
assert x.html_safe?, "should be safe"
assert_predicate x, :html_safe?
# getting a slice of it
y = x[0..-1]
# should still be safe
assert y.html_safe?, "should be safe"
assert_predicate y, :html_safe?
end
test "Should work with interpolation (array argument)" do