instance method
assert_not_in_body
Ruby on Rails 8.1.2
Since v8.1.2Signature
assert_not_in_body(text)
Asserts that the given +text+ is not present anywhere in the response body.
assert_not_in_body fixture(:name).description
Parameters
-
textreq
Source
# File actionpack/lib/action_dispatch/testing/assertions/response.rb, line 84
def assert_not_in_body(text)
assert_no_match(/#{Regexp.escape(text)}/, @response.body)
end
Defined in actionpack/lib/action_dispatch/testing/assertions/response.rb line 84
· View on GitHub
· Improve this page
· Find usages on GitHub