I\'m writing a request spec and would like to test for the presence of the string \"Reports » Aging Reports\". I get an error (invalid multibyte char) if I put in the character
html_safe does not remove html tags if thats what you want.
html_safe
If you will remove html tags before you test you can use sanitize gem.
sanitize
# in Gemfile gem 'sanitize' # in testfile require 'sanitize' html = Sanitize.clean(page.body.text) html.should have_content("Reports » Aging Reports")