Guest User

Untitled

a guest
Jun 18th, 2018
69
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.75 KB | None | 0 0
  1. Then /^I should see "(.*)"$/ do |text|
  2. # webrat_session.wait_for :timeout => 5 do
  3. webrat_session.response.body.should contain(/#{text}/m)
  4. # end
  5. end
  6.  
  7. Then /^I should not see "(.*)"$/ do |text|
  8. # webrat_session.wait_for :timeout => 5 do
  9. webrat_session.response.body.should_not contain(/#{text}/m)
  10. # end
  11. end
  12.  
  13. Then /^I should see (a|an)? "(.*)" message$/ do |_, message_type|
  14. # webrat_session.wait_for :timeout => 5 do
  15. webrat_session.response.body.should have_selector(".#{message_type.gsub(' ', '-')}")
  16. # end
  17. end
  18.  
  19. Then /^I should not see (a|an)? "(.*)" message$/ do |_, message_type|
  20. # webrat_session.wait_for :timeout => 5 do
  21. webrat_session.response.body.should_not have_selector(".#{message_type.gsub(' ', '-')}")
  22. # end
  23. end
Add Comment
Please, Sign In to add comment