spec/unit/berkshelf/locations/git_location_spec.rb in berkshelf-3.0.0.beta4 vs spec/unit/berkshelf/locations/git_location_spec.rb in berkshelf-3.0.0.beta5

- old
+ new

@@ -10,16 +10,10 @@ expect { described_class.new(dependency, git: '/something/on/disk') }.to raise_error(Berkshelf::InvalidGitURI) end end - - describe "::tmpdir" do - it 'creates a temporary directory within the Berkshelf temporary directory' do - expect(described_class.tmpdir).to include(Berkshelf.tmp_dir) - end - end end let(:storage_path) { Berkshelf::CookbookStore.instance.storage_path } subject { described_class.new(dependency, git: 'git://github.com/RiotGames/berkshelf-cookbook-fixture.git') } @@ -77,11 +71,11 @@ let(:fake_remote) { remote_path('not_a_cookbook') } before { dependency.stub(name: "doesnot_exist") } subject { described_class.new(dependency, git: "file://#{fake_remote}.git") } it 'raises a CookbookNotFound error' do - subject.stub(:clone).and_return { + Berkshelf::Git.stub(:clone).and_return { FileUtils.mkdir_p(fake_remote) Dir.chdir(fake_remote) { |dir| `git init && echo hi > README && git add README && git commit README -m 'README'`; dir } } expect { subject.download }.to raise_error(Berkshelf::CookbookNotFound) @@ -96,10 +90,10 @@ expect { subject.download }.to raise_error(Berkshelf::CookbookValidationFailure) end end context 'given a value for tag' do - let(:tag) { '1.0.0' } + let(:tag) { 'v1.0.0' } subject do described_class.new(dependency, git: 'git://github.com/RiotGames/berkshelf-cookbook-fixture.git', tag: tag) end