diff options
author | Brett Walker <bwalker@gitlab.com> | 2018-01-05 15:43:47 +0100 |
---|---|---|
committer | Brett Walker <bwalker@gitlab.com> | 2018-01-22 17:25:10 +0100 |
commit | 2bd8eda4acba634f6a6ff44eadfe3578741f2a1c (patch) | |
tree | 06cfd73f8930692e17c550f6c5a2bd0ca2e76f45 | |
parent | 1eca2390120664867720920b5cf0bff17a0d0819 (diff) | |
download | gitlab-ce-2bd8eda4acba634f6a6ff44eadfe3578741f2a1c.tar.gz |
since we're setting to ENV values...
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.rb | 5 |
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 |