Re: [Rails] Testing selector order in RSpec

2012-03-05 Thread Dave Aronson
On Wed, Feb 29, 2012 at 23:28, Mike Kim wrote: > Could someone point me to a reference that explains how I would test > the order of elements on an HTML page? Maybe use a regexp that has one and then the other, with .* between them? Or find them, and make sure the indexes are in the right order

[Rails] Testing selector order in RSpec

2012-02-29 Thread Mike Kim
Could someone point me to a reference that explains how I would test the order of elements on an HTML page? For example, in RSpec I would like to verify that the content of one element appears before the content of another. response.should have_selector("p", :content => "Should appear first") re