Sha256: f280b766e17ad1aa44031940106c7a283ac591c949876d135449f9adf8549fb2

Contents?: true

Size: 213 Bytes

Versions: 3

Compression:

Stored size: 213 Bytes

Contents

module EnvironmentSupport
  def with_environment(replacement_env)
    original_env = ENV.to_hash
    ENV.update(replacement_env)

    begin
      yield
    ensure
      ENV.replace(original_env)
    end
  end
end

Version data entries

3 entries across 3 versions & 1 rubygems

Version Path
clearance-2.0.0.beta1 spec/support/environment.rb
clearance-1.17.0 spec/support/environment.rb
clearance-1.16.2 spec/support/environment.rb