ruby on rails - How to test for flash using cucumber -
i writing cucumber tests ror app , need test flash appear:
<p class='flashnotice flash'>message sent.</p>
however, can't find solution works. i've tried:
page.should have_selector('p', :class => 'flashnotice flash') page.should have_content fartknocker end
but returns error on :class , says can't use that. can show me right way test flash?
you can use style instead
page.should have_css('.flashnotice', text: "message sent")
Comments
Post a Comment