Sha256: 4e83298df1d897a521f7c5d67e268c0be2c9a77eb08b5cd7907a9a54523030e2
Contents?: true
Size: 1.24 KB
Versions: 3
Compression:
Stored size: 1.24 KB
Contents
require "spec_helper" module Beaker module Options describe Presets do let(:presets) { Presets.new } it "returns an env_vars OptionsHash" do expect(presets.env_vars).to be_instance_of(Beaker::Options::OptionsHash) end it "removes all empty/nil entries in env_vars" do expect(presets.env_vars.has_value?(nil)).to be === false expect(presets.env_vars.has_value?({})).to be === false end it "returns a presets OptionsHash" do expect(presets.presets).to be_instance_of(Beaker::Options::OptionsHash) end describe 'when setting the type as pe from the environment' do describe 'sets type to pe if...' do it 'env var is set to "true"' do munged = presets.format_found_env_vars( {:is_pe => 'true'} ) expect( munged[:type] ).to be == 'pe' end it 'env var is set to "yes"' do munged = presets.format_found_env_vars( {:is_pe => 'yes'} ) expect( munged[:type] ).to be == 'pe' end end it 'does not set type otherwise' do munged = presets.format_found_env_vars( {:is_pe => 'false'} ) expect( munged[:type] ).to be == nil end end end end end
Version data entries
3 entries across 3 versions & 1 rubygems
Version | Path |
---|---|
beaker-1.21.0 | spec/beaker/options/presets_spec.rb |
beaker-1.20.1 | spec/beaker/options/presets_spec.rb |
beaker-1.20.0 | spec/beaker/options/presets_spec.rb |