Sha256: 62260adcd7464503cab78aa0ec5eec38b4c62e36ae24c50702ddb5bc14b09ff6

Contents?: true

Size: 975 Bytes

Versions: 16

Compression:

Stored size: 975 Bytes

Contents

require "spec_helper"

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

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

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

      describe '#get_type' do
        let(:options) { described_class.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

16 entries across 16 versions & 1 rubygems

Version Path
beaker-6.4.1 spec/beaker/options/options_hash_spec.rb
beaker-6.4.0 spec/beaker/options/options_hash_spec.rb
beaker-6.3.0 spec/beaker/options/options_hash_spec.rb
beaker-6.2.0 spec/beaker/options/options_hash_spec.rb
beaker-6.1.0 spec/beaker/options/options_hash_spec.rb
beaker-5.8.1 spec/beaker/options/options_hash_spec.rb
beaker-5.8.0 spec/beaker/options/options_hash_spec.rb
beaker-5.7.0 spec/beaker/options/options_hash_spec.rb
beaker-5.6.0 spec/beaker/options/options_hash_spec.rb
beaker-5.5.0 spec/beaker/options/options_hash_spec.rb
beaker-5.4.0 spec/beaker/options/options_hash_spec.rb
beaker-5.3.1 spec/beaker/options/options_hash_spec.rb
beaker-5.3.0 spec/beaker/options/options_hash_spec.rb
beaker-5.2.0 spec/beaker/options/options_hash_spec.rb
beaker-5.1.0 spec/beaker/options/options_hash_spec.rb
beaker-5.0.0 spec/beaker/options/options_hash_spec.rb