/ Published in: Rails
RSpec + Capybara method to visit a page and make sure no encoded HTML is displayed to use. Stick in spec_helper
- # visits a page and makes sure there is no visible HTML to the user
- def screen(path)
- visit (path)
- if page.has_content?('</')
- page.should_not have_content('</')
You need to login to post a comment.