提交 1a47bd37 编写于 作者: S 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.
上级 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% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册