Sha256: 6bbfabebaead69776db5ee0671913555da3a2a6295f6bd1b01d6cf0fad4bd410

Contents?: true

Size: 883 Bytes

Versions: 36

Compression:

Stored size: 883 Bytes

Contents

require 'spec_helper'

module Berkshelf
  describe Location do
    let(:dependency) { double(name: 'bacon') }

    describe '.init' do
      it 'finds a :path location by key' do
        instance = described_class.init(dependency, path: '~/Dev/meats/bacon')
        expect(instance).to be_a(PathLocation)
      end

      it 'finds a :git location by key' do
        instance = described_class.init(dependency, git: 'git://foo.com/meats/bacon.git')
        expect(instance).to be_a(GitLocation)
      end

      it 'finds a :github location by key' do
        instance = described_class.init(dependency, github: 'meats/bacon')
        expect(instance).to be_a(GitLocation)
      end

      it 'returns nil when a location cannot be found' do
        instance = described_class.init(dependency, lamesauce: 'meats/bacon')
        expect(instance).to be_nil
      end
    end
  end
end

Version data entries

36 entries across 36 versions & 1 rubygems

Version Path
berkshelf-5.5.0 spec/unit/berkshelf/location_spec.rb
berkshelf-5.4.0 spec/unit/berkshelf/location_spec.rb
berkshelf-5.3.0 spec/unit/berkshelf/location_spec.rb
berkshelf-5.2.0 spec/unit/berkshelf/location_spec.rb
berkshelf-5.1.0 spec/unit/berkshelf/location_spec.rb
berkshelf-5.0.0 spec/unit/berkshelf/location_spec.rb
berkshelf-4.3.5 spec/unit/berkshelf/location_spec.rb
berkshelf-4.3.3 spec/unit/berkshelf/location_spec.rb
berkshelf-4.3.2 spec/unit/berkshelf/location_spec.rb
berkshelf-4.3.1 spec/unit/berkshelf/location_spec.rb
berkshelf-4.3.0 spec/unit/berkshelf/location_spec.rb
berkshelf-4.2.3 spec/unit/berkshelf/location_spec.rb
berkshelf-4.2.2 spec/unit/berkshelf/location_spec.rb
berkshelf-4.2.1 spec/unit/berkshelf/location_spec.rb
berkshelf-4.2.0 spec/unit/berkshelf/location_spec.rb
berkshelf-4.1.1 spec/unit/berkshelf/location_spec.rb
berkshelf-4.1.0 spec/unit/berkshelf/location_spec.rb
berkshelf-4.0.1 spec/unit/berkshelf/location_spec.rb
berkshelf-4.0.0 spec/unit/berkshelf/location_spec.rb
berkshelf-3.3.0 spec/unit/berkshelf/location_spec.rb