I am writing cucumber tests for my RoR app and I need to test for a flash to appear:
<p class='flashnotice flash'>Message was successfully sent.</p>
However, I just can't find a solution that works. I've tried:
page.should have_selector('p', :class => 'flashnotice flash') do
page.should have_content fartknocker
end
But that returns an error on :class and says I can't use that. Can someone show me the right way to test for flash?