Sha256: 7cb9ff944c7ccaf8aaa96ed5eda57500dea1da864268350f1eba30c06865a7a6

Contents?: true

Size: 1011 Bytes

Versions: 131

Compression:

Stored size: 1011 Bytes

Contents

require "spec_helper"

module Beaker
  module Options
    describe OptionsHash do
      let(:options)    { Beaker::Options::OptionsHash.new }


      it "supports is_pe?, defaults to pe" do
        expect(options.is_pe?).to be_truthy
      end

      it "supports is_pe?, respects :type == foss" do
        options[:type] = 'foss'
        expect(options.is_pe?).to be_falsy
      end

      describe '#get_type' do
        let(:options) { Beaker::Options::OptionsHash.new }

        it 'returns pe as expected in the normal case' do
          newhash = options.merge({:type => 'pe'})
          expect(newhash.get_type).to be === :pe
        end

        it 'returns foss as expected in the normal case' do
          newhash = options.merge({:type => 'foss'})
          expect(newhash.get_type).to be === :foss
        end

        it 'returns foss as the default' do
          newhash = options.merge({:type => 'git'})
          expect(newhash.get_type).to be === :foss
        end
      end
    end

  end
end

Version data entries

131 entries across 131 versions & 1 rubygems

Version Path
beaker-4.25.0 spec/beaker/options/options_hash_spec.rb
beaker-4.24.0 spec/beaker/options/options_hash_spec.rb
beaker-4.23.2 spec/beaker/options/options_hash_spec.rb
beaker-4.23.1 spec/beaker/options/options_hash_spec.rb
beaker-4.23.0 spec/beaker/options/options_hash_spec.rb
beaker-4.22.1 spec/beaker/options/options_hash_spec.rb
beaker-4.22.0 spec/beaker/options/options_hash_spec.rb
beaker-4.21.0 spec/beaker/options/options_hash_spec.rb
beaker-4.20.0 spec/beaker/options/options_hash_spec.rb
beaker-4.19.0 spec/beaker/options/options_hash_spec.rb
beaker-4.18.0 spec/beaker/options/options_hash_spec.rb
beaker-4.17.0 spec/beaker/options/options_hash_spec.rb
beaker-4.16.0 spec/beaker/options/options_hash_spec.rb
beaker-4.15.0 spec/beaker/options/options_hash_spec.rb
beaker-4.14.1 spec/beaker/options/options_hash_spec.rb
beaker-4.14.0 spec/beaker/options/options_hash_spec.rb
beaker-4.13.1 spec/beaker/options/options_hash_spec.rb
beaker-4.13.0 spec/beaker/options/options_hash_spec.rb
beaker-4.12.0 spec/beaker/options/options_hash_spec.rb
beaker-4.11.1 spec/beaker/options/options_hash_spec.rb