Sha256: 8ce6a434e9321cee9c6295b585547ec7145db600d9223152af1642f09dd36ec0

Contents?: true

Size: 765 Bytes

Versions: 7

Compression:

Stored size: 765 Bytes

Contents

require 'spec_helper'

describe Berkshelf::PathLocation do
  let(:constraint) { double('comp-vconstraint', satisfies?: true) }
  let(:dependency) { double('dep', name: "nginx", version_constraint: constraint) }
  let(:path) { fixtures_path.join('cookbooks', 'example_cookbook').to_s }

  describe "ClassMethods" do
    describe "::new" do
      it 'assigns the value of :path to #path' do
        location = described_class.new(dependency, path: path)
        expect(location.path).to eq(path)
      end
    end
  end

  let(:options) { { path: path } }
  let(:instance) { described_class.new(dependency, options) }

  describe "#download" do
    it "returns a CachedCookbook" do
      expect(instance.download).to be_a(Berkshelf::CachedCookbook)
    end
  end
end

Version data entries

7 entries across 7 versions & 1 rubygems

Version Path
berkshelf-3.0.0.beta7 spec/unit/berkshelf/locations/path_location_spec.rb
berkshelf-3.0.0.beta6 spec/unit/berkshelf/locations/path_location_spec.rb
berkshelf-3.0.0.beta5 spec/unit/berkshelf/locations/path_location_spec.rb
berkshelf-3.0.0.beta4 spec/unit/berkshelf/locations/path_location_spec.rb
berkshelf-3.0.0.beta3 spec/unit/berkshelf/locations/path_location_spec.rb
berkshelf-3.0.0.beta2 spec/unit/berkshelf/locations/path_location_spec.rb
berkshelf-3.0.0.beta1 spec/unit/berkshelf/locations/path_location_spec.rb