[rspec-users] Test HTML output from Rails helper

Thomas Watson Steen twa at 3dbyggeri.dk
Sat Oct 18 04:40:04 EDT 2008


I'm using RSpec in with Ruby on Rails. I've made a helper module  
method that generates some HTML and would like to create a rspec test  
to validate this HTML. I can of cause use regex to validate it as a  
string, but would much rather validate it by traversing the DOM and  
checking that the elements I expect is present. Any pointers?


More information about the rspec-users mailing list