Skip to content

Instantly share code, notes, and snippets.

@kalv
Created October 27, 2010 13:11
Show Gist options
  • Save kalv/649000 to your computer and use it in GitHub Desktop.
Save kalv/649000 to your computer and use it in GitHub Desktop.
class Capybara::Driver::RackTest < Capybara::Driver::Base
class Node < Capybara::Node
def click
if tag_name == 'a'
driver.process(:get, self[:href].to_s)
elsif (tag_name == 'input' or tag_name == 'button') and %w(submit image).include?(type)
Form.new(driver, form).submit(self)
end
end
end
end
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment