diff options
author | Robert Speicher <rspeicher@gmail.com> | 2016-11-28 11:50:08 +0300 |
---|---|---|
committer | Robert Speicher <rspeicher@gmail.com> | 2016-11-28 11:50:08 +0300 |
commit | 1e66f35c560b5a0067851cabb792fe23281cfd51 (patch) | |
tree | 0dd8d02efa404d3ab16f8da56a0e5ef676d05943 /features/support | |
parent | eff2404785f58241f947bd7388564f49119d517d (diff) |
Pass `--load-images=no` to PhantomJS via Capybara/Poltergeist
We were unintentionally hitting `gravatar.com` whenever a test that used
Poltergeist was run. This was certainly wasting their resources and
slowing down our tests even further, for no reason.
Diffstat (limited to 'features/support')
-rw-r--r-- | features/support/capybara.rb | 10 |
1 files changed, 9 insertions, 1 deletions
diff --git a/features/support/capybara.rb b/features/support/capybara.rb index dae0d0f918c..47372df152d 100644 --- a/features/support/capybara.rb +++ b/features/support/capybara.rb @@ -6,7 +6,15 @@ timeout = (ENV['CI'] || ENV['CI_SERVER']) ? 90 : 15 Capybara.javascript_driver = :poltergeist Capybara.register_driver :poltergeist do |app| - Capybara::Poltergeist::Driver.new(app, js_errors: true, timeout: timeout, window_size: [1366, 768]) + Capybara::Poltergeist::Driver.new( + app, + js_errors: true, + timeout: timeout, + window_size: [1366, 768], + phantomjs_options: [ + '--load-images=no' + ] + ) end Capybara.default_max_wait_time = timeout |