summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorBrett Walker <bwalker@gitlab.com>2018-01-05 15:43:47 +0100
committerBrett Walker <bwalker@gitlab.com>2018-01-05 15:43:47 +0100
commit0ebe2a644bdab0ec955f9a7e178a57309102f9c2 (patch)
treee5a31c3af6fba058a97b43c5c1f9a6657bc36c01
parentd9587cf2b2da9b398b8cbf93b78a853a42a8d960 (diff)
downloadgitlab-ce-149-qa-honor-chrome-headless-false.tar.gz
since we're setting to ENV values...149-qa-honor-chrome-headless-false
move the `allow(ENV).to receive(:[]).and_call_original` to the front so the seconda call doesn't override the first
-rw-r--r--qa/spec/runtime/env_spec.rb5
1 files changed, 4 insertions, 1 deletions
diff --git a/qa/spec/runtime/env_spec.rb b/qa/spec/runtime/env_spec.rb
index e8da51ddce7..57a72a04507 100644
--- a/qa/spec/runtime/env_spec.rb
+++ b/qa/spec/runtime/env_spec.rb
@@ -1,4 +1,8 @@
describe QA::Runtime::Env do
+ before do
+ allow(ENV).to receive(:[]).and_call_original
+ end
+
describe '.chrome_headless?' do
context 'when there is an env variable set' do
it 'returns false when falsey values specified' do
@@ -55,7 +59,6 @@ describe QA::Runtime::Env do
end
def stub_env(name, value)
- allow(ENV).to receive(:[]).and_call_original
allow(ENV).to receive(:[]).with(name).and_return(value)
end
end