Created
January 25, 2016 14:15
-
-
Save rilian/06d9111365a2f4242f58 to your computer and use it in GitHub Desktop.
capybara.rb
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
Capybara.register_driver :poltergeist do |app| | |
Capybara::Poltergeist::Driver.new( | |
app, | |
phantomjs_logger: File.open("#{Rails.root}/log/test_phantomjs.log", 'a'), | |
timeout: 30, | |
window_size: [1536, 1024], | |
phantomjs_options: [ | |
'--load-images=no', | |
'--ignore-ssl-errors=yes', | |
'--disk-cache=true' | |
] | |
) | |
end | |
Capybara.javascript_driver = :poltergeist # :selenium | |
Capybara.default_max_wait_time = 10 | |
Capybara.save_and_open_page_path = '/tmp' | |
Capybara::Screenshot.prune_strategy = :keep_last_run | |
RSpec.configure do |config| | |
config.include Warden::Test::Helpers | |
config.before(:suite) { Warden.test_mode! } | |
config.after(:each) { Warden.test_reset! } | |
end |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment