Skip to content

Commit

Permalink
Removes unnecessary screenshot helper
Browse files Browse the repository at this point in the history
Switches timeout based on being on slow CI, or fast dev boxes

- can use Capybara's built in `save_and_open_screenshot`
  • Loading branch information
TildeWill committed Apr 19, 2016
1 parent 7c9fe17 commit 8a7f3fe
Show file tree
Hide file tree
Showing 4 changed files with 4 additions and 18 deletions.
1 change: 0 additions & 1 deletion Gemfile
Original file line number Diff line number Diff line change
Expand Up @@ -144,7 +144,6 @@ group :development do
gem 'coveralls', require: false
gem 'capybara-select2', require: false
gem 'delorean'
gem 'launchy', require: false
gem 'poltergeist'
gem 'pry-rails'
gem 'rr'
Expand Down
1 change: 0 additions & 1 deletion Gemfile.lock
Original file line number Diff line number Diff line change
Expand Up @@ -627,7 +627,6 @@ DEPENDENCIES
jsonpath (~> 0.5.6)
kaminari (~> 0.16.1)
kramdown (~> 1.3.3)
launchy
letter_opener_web
liquid (~> 3.0.3)
listen (~> 3.0.5)
Expand Down
8 changes: 4 additions & 4 deletions spec/capybara_helper.rb
Original file line number Diff line number Diff line change
Expand Up @@ -2,18 +2,18 @@
require 'capybara/rails'
require 'capybara/poltergeist'
require 'capybara-select2'
require 'helpers/capybara_poltergeist_screenshot'

CAPYBARA_TIMEOUT = ENV['CI'] == 'true' ? 60 : 5

Capybara.register_driver :poltergeist do |app|
Capybara::Poltergeist::Driver.new(app, timeout: 5)
Capybara::Poltergeist::Driver.new(app, timeout: CAPYBARA_TIMEOUT)
end

Capybara.javascript_driver = :poltergeist
Capybara.default_max_wait_time = 5
Capybara.default_max_wait_time = CAPYBARA_TIMEOUT

RSpec.configure do |config|
config.include Warden::Test::Helpers
config.include Capybara::PoltergeistScreenshot
config.before :suite do
Warden.test_mode!
end
Expand Down
12 changes: 0 additions & 12 deletions spec/helpers/capybara_poltergeist_screenshot.rb

This file was deleted.

0 comments on commit 8a7f3fe

Please sign in to comment.