summaryrefslogtreecommitdiff
path: root/spec/support/capybara.rb
diff options
context:
space:
mode:
authorRobert Speicher <rspeicher@gmail.com>2015-04-25 17:22:44 -0400
committerRobert Speicher <rspeicher@gmail.com>2015-04-25 21:33:17 -0400
commit652c15b585bac393b5c403a03355040eef51789c (patch)
tree535dc4ee314d2d3b865b8c7e1345cb45651071c5 /spec/support/capybara.rb
parent3875930793bf4e0274aabc4db7e3a31259d7297b (diff)
downloadgitlab-ce-652c15b585bac393b5c403a03355040eef51789c.tar.gz
Don't use capybara-screenshot in CI environmentsrs-capybara-screenshot
Diffstat (limited to 'spec/support/capybara.rb')
-rw-r--r--spec/support/capybara.rb8
1 files changed, 5 insertions, 3 deletions
diff --git a/spec/support/capybara.rb b/spec/support/capybara.rb
index ead99abddc8..fed1ab6ee33 100644
--- a/spec/support/capybara.rb
+++ b/spec/support/capybara.rb
@@ -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