Sha256: 5c1b96446f86b005b4c6c6d200779e7ea27b727ca8e09c53423669e5aebb454a
Contents?: true
Size: 1.05 KB
Versions: 10
Compression:
Stored size: 1.05 KB
Contents
require 'spec_helper' module Berkshelf describe CookbookSource::PathLocation do let(:path) { fixtures_path.join("cookbooks", "example_cookbook").to_s } subject { CookbookSource::PathLocation.new("nginx", :path => path) } describe "#download" do it "returns the path to the cookbook" do subject.download(tmp_path).should eql(path) end context "given a path that does not exist" do subject { CookbookSource::PathLocation.new("doesnot_exist", :path => tmp_path.join("doesntexist_noway")) } it "raises a CookbookNotFound error" do lambda { subject.download(tmp_path) }.should raise_error(CookbookNotFound) end end context "given a path that does not contain a cookbook" do subject { CookbookSource::PathLocation.new("doesnot_exist", :path => fixtures_path) } it "raises a CookbookNotFound error" do lambda { subject.download(tmp_path) }.should raise_error(CookbookNotFound) end end end end end
Version data entries
10 entries across 10 versions & 1 rubygems