/ Published in: Rails

RSpec + Capybara method to visit a page and make sure no encoded HTML is displayed to use. Stick in spec_helper
Expand |
Embed | Plain Text
Copy this code and paste it in your HTML
# visits a page and makes sure there is no visible HTML to the user def screen(path) visit (path) if page.has_content?('</') save_and_open_page page.should_not have_content('</') end end
Comments
