In Ruby on Rails, given a string, is it possible to determine whether .html_safe has been called on that string?
Reason for asking: I'd like to write a controller unit test that verifies that html_safe has not been called on a particular string, in order to prove that when that string later gets rendered onto a page in a view, Rails will escape the string (avoiding possible XSS vulnerabilities).
I realize that I could instead go ahead and actually render the page in my test, and then inspect the rendered page body, but I'm wondering if there's a more direct way of doing this?