Guest User

Untitled

a guest
Jul 16th, 2018
82
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.43 KB | None | 0 0
  1. # Webrat relies on the onclick attribute to "fake" HTTP request's
  2. # method, so it cannot cope with the new Ruby on Rails 3's style
  3. # which uses unobtrusive JavaScript and HTML5 data attributes.
  4.  
  5. When /^(?:|I )follow "([^\"]*)" for #{capture_model}$/ do |arg1, arg2|
  6. id = "#user_#{model(arg2).id}"
  7. case arg1
  8. when 'Delete'
  9. within id do
  10. click_link arg1, :method => :delete
  11. end
  12. else
  13. click_link_within id, arg1
  14. end
  15. end
Add Comment
Please, Sign In to add comment