Don't use capybara-screenshot in CI environments

This commit is contained in:
Robert Speicher 2015-04-25 17:22:44 -04:00
parent 3875930793
commit 652c15b585
2 changed files with 10 additions and 6 deletions

View File

@ -16,7 +16,9 @@ end
Capybara.default_wait_time = timeout
Capybara.ignore_hidden_elements = false
require 'capybara-screenshot/spinach'
unless ENV['CI'] || ENV['CI_SERVER']
require 'capybara-screenshot/spinach'
# Keep only the screenshots generated from the last failing test suite
Capybara::Screenshot.prune_strategy = :keep_last_run
# Keep only the screenshots generated from the last failing test suite
Capybara::Screenshot.prune_strategy = :keep_last_run
end

View File

@ -13,7 +13,9 @@ end
Capybara.default_wait_time = timeout
Capybara.ignore_hidden_elements = true
require 'capybara-screenshot/rspec'
unless ENV['CI'] || ENV['CI_SERVER']
require 'capybara-screenshot/rspec'
# Keep only the screenshots generated from the last failing test suite
Capybara::Screenshot.prune_strategy = :keep_last_run
# Keep only the screenshots generated from the last failing test suite
Capybara::Screenshot.prune_strategy = :keep_last_run
end