Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- # Webrat relies on the onclick attribute to "fake" HTTP request's
- # method, so it cannot cope with the new Ruby on Rails 3's style
- # which uses unobtrusive JavaScript and HTML5 data attributes.
- When /^(?:|I )follow "([^\"]*)" for #{capture_model}$/ do |arg1, arg2|
- id = "#user_#{model(arg2).id}"
- case arg1
- when 'Delete'
- within id do
- click_link arg1, :method => :delete
- end
- else
- click_link_within id, arg1
- end
- end
Add Comment
Please, Sign In to add comment