Sha256: 7890104a1a59a6ba4d20d64718d9c23eb8dff9da17a4a0c7dcd6ec73012b281c

Contents?: true

Size: 872 Bytes

Versions: 9

Compression:

Stored size: 872 Bytes

Contents

require 'spec_helper'

describe Minimart::InventoryRequirement::BaseRequirement do

  subject do
    Minimart::InventoryRequirement::BaseRequirement.new(
      'mysql',
      version_requirement: '> 1.0.0')
  end

  describe '::new' do
    it 'should set the name' do
      expect(subject.name).to eq 'mysql'
    end

    it 'should set the version requirement' do
      expect(subject.version_requirement).to eq '> 1.0.0'
    end
  end

  describe '#explicit_location?' do
    it 'should return false' do
      expect(subject.explicit_location?).to eq false
    end
  end

  describe '#requirements' do
    it 'should return the proper requirements' do
      expect(subject.requirements).to eq 'mysql' => '> 1.0.0'
    end
  end

  describe '#matching_source?' do
    it 'should default to true' do
      expect(subject.matching_source?({})).to eq true
    end
  end
end

Version data entries

9 entries across 9 versions & 1 rubygems

Version Path
minimart-1.2.5 spec/lib/minimart/inventory_requirement/base_requirement_spec.rb
minimart-1.2.4 spec/lib/minimart/inventory_requirement/base_requirement_spec.rb
minimart-1.2.3 spec/lib/minimart/inventory_requirement/base_requirement_spec.rb
minimart-1.2.0 spec/lib/minimart/inventory_requirement/base_requirement_spec.rb
minimart-1.1.6 spec/lib/minimart/inventory_requirement/base_requirement_spec.rb
minimart-1.1.3 spec/lib/minimart/inventory_requirement/base_requirement_spec.rb
minimart-1.0.2 spec/lib/minimart/inventory_requirement/base_requirement_spec.rb
minimart-1.0.1 spec/lib/minimart/inventory_requirement/base_requirement_spec.rb
minimart-0.0.1 spec/lib/minimart/inventory_requirement/base_requirement_spec.rb