Sha256: 249bdd927cdefd2415ece3c84a29ed3a31d401ac6506c727b4437a50a5fbdad6
Contents?: true
Size: 451 Bytes
Versions: 37
Compression:
Stored size: 451 Bytes
Contents
module Omnibus module RSpec module EnvHelpers # # Stub the given environment key. # # @param [String] key # @param [String] value # def stub_env(key, value) unless @__env_already_stubbed__ allow(ENV).to receive(:[]).and_call_original @__env_already_stubbed__ = true end allow(ENV).to receive(:[]).with(key).and_return(value.to_s) end end end end
Version data entries
37 entries across 37 versions & 1 rubygems