have_selector should show more helpful error messages on :count
Reported by Jesper Rønn-Jensen | August 26th, 2009 @ 05:13 AM
Hey!
After discussing this on IRC yesterday, I ended up implementing a
better, more helpful error message on have_selector with :count
option.
In stead of this in your test result:
expected following output to contain a <.secondary
span.hist5d/> tag:
(which was an incorrect reply when 7 items were expected and only 2
were found)
You now get this:
expected following output to contain 7 <.secondary
span.hist5d/> tag. Found 9:
I also added a test to confirm it's working.
Find my fork to pull from here:
http://github.com/jesperronn/webrat/tree/master
I also attached the .patch file
Comments and changes to this ticket
Create your profile
Help contribute to this project by taking a few moments to create your personal profile. Create your profile »
Ruby Acceptance Testing for Web applications.