Sha256: ac8990a49d5d270c7c6a4afd791e3c1acbb31864fdb8e5a22fcf40f1ecd894d4

Contents?: true

Size: 966 Bytes

Versions: 53

Compression:

Stored size: 966 Bytes

Contents

require 'spec_helper'

require 'pe_build/config'
require 'pe_build/util/config'


describe PEBuild::Util::Config do
  let(:global) { PEBuild::Config::Global.new }
  let(:local)  { PEBuild::Config::PEBootstrap.new }

  before(:each) do
    global.finalize!
    local.finalize!
  end

  describe 'when merging global and local configs' do

    describe 'merged version' do
      it 'is inherited from global if local is unset' do
        global.version = '3.0.0'

        result = subject.local_merge(local, global)

        expect(result.version).to eq('3.0.0')
      end

      it 'is equal to local if set' do
        global.version = '3.0.0'
        local.version = '2.7.0'

        result = subject.local_merge(local, global)

        expect(result.version).to eq('2.7.0')
      end

      it 'is nil if neither global nor local is set' do
        result = subject.local_merge(local, global)

        expect(result.version).to be_nil
      end
    end

  end
end

Version data entries

53 entries across 53 versions & 1 rubygems

Version Path
vagrant-pe_build-0.17.0 spec/unit/util/config_spec.rb
vagrant-pe_build-0.16.0 spec/unit/util/config_spec.rb
vagrant-pe_build-0.15.6 spec/unit/util/config_spec.rb
vagrant-pe_build-0.15.5 spec/unit/util/config_spec.rb
vagrant-pe_build-0.15.4 spec/unit/util/config_spec.rb
vagrant-pe_build-0.15.3 spec/unit/util/config_spec.rb
vagrant-pe_build-0.15.1 spec/unit/util/config_spec.rb
vagrant-pe_build-0.15.0 spec/unit/util/config_spec.rb
vagrant-pe_build-0.14.2 spec/unit/util/config_spec.rb
vagrant-pe_build-0.14.1 spec/unit/util/config_spec.rb
vagrant-pe_build-0.14.0 spec/unit/util/config_spec.rb
vagrant-pe_build-0.13.7 spec/unit/util/config_spec.rb
vagrant-pe_build-0.13.6 spec/unit/util/config_spec.rb
vagrant-pe_build-0.13.5 spec/unit/util/config_spec.rb
vagrant-pe_build-0.13.4 spec/unit/util/config_spec.rb
vagrant-pe_build-0.13.3 spec/unit/util/config_spec.rb
vagrant-pe_build-0.13.2 spec/unit/util/config_spec.rb
vagrant-pe_build-0.13.1 spec/unit/util/config_spec.rb
vagrant-pe_build-0.13.0 spec/unit/util/config_spec.rb
vagrant-pe_build-0.12.0 spec/unit/util/config_spec.rb