bintz-integration_testing_s.../skel/root/features/support/drivers.rb.tt

27 lines
617 B
Plaintext

# capybara drivers for fast testing
#
<% if rails %>
# this one runs your entire test suite
require 'capybara/poltergeist'
# this one runs while you continuously test via guard
require 'persistent_selenium/driver'
# you can override the driver with the DRIVER environment variable
ENV['DRIVER'] ||= 'persistent_selenium'
# if PhantomJS is having problems clicking something, use dom_click
class Capybara::Node::Element
def dom_click
synchronize do
begin
trigger('click')
rescue NotImplementedError, Capybara::NotSupportedByDriverError
click
end
end
end
end
<% end %>