Rspec testing for html entities in page content
问题 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 in my matcher expression directly, so I tried this: page.should have_content("Reports » Aging Reports") This fails the test with the message: expected there to be content "Reports » Aging Reports" in "\n Reports » Aging Reports\n I've tried things like .html_safe with no success. Is there a way to test for text containing