Welcome to mirror list, hosted at ThFree Co, Russian Federation.

stub_env.rb « support « spec - gitlab.com/gitlab-org/gitlab-foss.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
blob: 18597b5c71f7c481fc4bfef64c9494cb7f9452e7 (plain)
1
2
3
4
5
6
7
module StubENV
  def stub_env(key, value)
    allow(ENV).to receive(:[]).and_call_original unless @env_already_stubbed
    @env_already_stubbed ||= true
    allow(ENV).to receive(:[]).with(key).and_return(value)
  end
end