Sha256: e24a69ac4b35e5f4b8678c2980d968e6bae1fa8a3f7fe96c599d9fcde4e4d62c

Contents?: true

Size: 586 Bytes

Versions: 16

Compression:

Stored size: 586 Bytes

Contents

describe Briar::Environment do

  let(:variable_name) {'BRIAR_RSPEC_TEST_VARIABLE'}

  before(:each) {
    ENV.delete(variable_name)
  }

  describe '.variable' do
    it 'returns value of environment variable' do
      ENV[variable_name] = 'foo'
      expect(Briar::Environment.variable(variable_name)).to be == 'foo'
    end
  end

  describe '.set_variable' do
    it 'can set value of environment variable' do
      expect(ENV[variable_name]).to be == nil
      Briar::Environment.set_variable(variable_name, 'foo')
      expect(ENV[variable_name]).to be == 'foo'
    end
  end
end

Version data entries

16 entries across 16 versions & 1 rubygems

Version Path
briar-2.0.5 spec/lib/environment_spec.rb
briar-2.0.4 spec/lib/environment_spec.rb
briar-2.0.3 spec/lib/environment_spec.rb
briar-2.0.2 spec/lib/environment_spec.rb
briar-2.0.1 spec/lib/environment_spec.rb
briar-2.0.0 spec/lib/environment_spec.rb
briar-1.4.2 spec/lib/environment_spec.rb
briar-1.4.1 spec/lib/environment_spec.rb
briar-1.3.2 spec/lib/environment_spec.rb
briar-1.3.1 spec/lib/environment_spec.rb
briar-1.3.0 spec/lib/environment_spec.rb
briar-1.2.2 spec/lib/environment_spec.rb
briar-1.2.1 spec/lib/environment_spec.rb
briar-1.2.0 spec/lib/environment_spec.rb
briar-1.1.9 spec/lib/environment_spec.rb
briar-1.1.8 spec/lib/environment_spec.rb