Sha256: b706955563c99e8694ec0bb931fc6688fc0d55ad4408a78423cf8283cbaea30d

Contents?: true

Size: 287 Bytes

Versions: 13

Compression:

Stored size: 287 Bytes

Contents

module SpecHelpers
  def env
    @env ||= {}
  end

  def with_env
    original_values = {}
    env.each do |key, val|
      original_values[key] = ENV[key]
      ENV[key] = val
    end
    yield
  ensure
    original_values.each do |key, value|
      ENV[key] = value
    end
  end
end

Version data entries

13 entries across 13 versions & 1 rubygems

Version Path
bpm-1.0.0.beta.13 spec/support/env.rb
bpm-1.0.0.beta.12 spec/support/env.rb
bpm-1.0.0.beta.11 spec/support/env.rb
bpm-1.0.0.beta.10 spec/support/env.rb
bpm-1.0.0.beta.9 spec/support/env.rb
bpm-1.0.0.beta.8 spec/support/env.rb
bpm-1.0.0.beta.6 spec/support/env.rb
bpm-1.0.0.beta.5 spec/support/env.rb
bpm-1.0.0.beta.4 spec/support/env.rb
bpm-0.1.4 spec/support/env.rb
bpm-0.1.3 spec/support/env.rb
bpm-0.1.2 spec/support/env.rb
bpm-0.1.0 spec/support/env.rb