spec/external_spec.rb in palimpsest-0.1.0 vs spec/external_spec.rb in palimpsest-0.1.1
- old
+ new
@@ -9,10 +9,11 @@
before :each do
allow(Grit::Git).to receive(:new).and_return(gritty)
allow(Grit::Repo).to receive(:new).and_return(repo)
allow(gritty).to receive(:clone)
+ allow(repo).to receive(:archive_tar)
end
describe "#repo_path" do
it "gives the full path to the source repo" do
@@ -75,12 +76,13 @@
end
end
describe "#install" do
- it "installs the external to the install path" do
+ it "populates and installs the external to the install path and returns itself" do
external.install_path = 'path/to/install'
+ expect(external.environment).to receive(:populate).and_return(external.environment)
expect(external.environment).to receive(:copy).with(dest: 'path/to/install')
- external.install
+ expect(external.install).to be external
end
end
end