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

Popular posts from this blog

linux - Does gcc have any options to add version info in ELF binary file? -

android - send complex objects as post php java -

charts - What graph/dashboard product is facebook using in Dashboard: PUE & WUE -