Created
August 26, 2014 16:14
-
-
Save shekibobo/4c101a8d5a787c6b7d03 to your computer and use it in GitHub Desktop.
Conditionally swapping to Selenium for tests with touchy javascript issues.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# spec/support/capybara.rb | |
require 'capybara/poltergeist' | |
Capybara.asset_host = 'http://localhost:3000' | |
Capybara.javascript_driver = :poltergeist | |
RSpec.configure do |config| | |
config.before(:each, touchy_js: true) do | |
Capybara.current_driver = :selenium | |
end | |
config.after(:each, touchy_js: true) do | |
Capybara.use_default_driver | |
end | |
end |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment