Sha256: 0fa2e2ca5c21698636110e954a09bd9dbafde512fc0686eb9eccd1e14819b51c

Contents?: true

Size: 843 Bytes

Versions: 9

Compression:

Stored size: 843 Bytes

Contents

require 'spec_helper'

describe Minimart::InventoryRequirement::LocalRequirementsBuilder do

  describe '#build' do
    subject do
      Minimart::InventoryRequirement::LocalRequirementsBuilder.new('mysql', 'path' => '/my/local/path')
    end

    it 'should return a single requirement' do
      expect(subject.build.size).to eq 1
    end

    it 'should give the requirement the proper name' do
      expect(subject.build.first.name).to eq 'mysql'
    end

    it 'should give the requirement the proper path' do
      expect(subject.build.first.path).to eq '/my/local/path'
    end

    context 'when no path is provided' do
      subject do
        Minimart::InventoryRequirement::LocalRequirementsBuilder.new('mysql', {})
      end

      it 'should return empty' do
        expect(subject.build).to be_empty
      end
    end
  end

end

Version data entries

9 entries across 9 versions & 1 rubygems

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