Commit 1a47bd37 authored by Stan Hu's avatar Stan Hu

Reset the state of StubENV's @env_already_stubbed after each spec run

In certain combination of tests, @env_already_stubbed could be set
to `true` even though it never ran for that specific test.
parent 47face01
......@@ -5,3 +5,11 @@ module StubENV
allow(ENV).to receive(:[]).with(key).and_return(value)
end
end
# It's possible that the state of the class variables are not reset across
# test runs.
RSpec.configure do |config|
config.after(:each) do
@env_already_stubbed = nil
end
end
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment