spec/lib/vendorise/tasks_spec.rb in vendorise-0.1.1 vs spec/lib/vendorise/tasks_spec.rb in vendorise-0.2.0
- old
+ new
@@ -10,7 +10,17 @@
end
it "accepts a url argument" do
expect(task.arg_names).to match_array [:url]
end
+
+ it "creates a new arborist and passes it's command to system" do
+ fake_arborist = double("Arborist", subtree_command: "touch foo.tmp")
+ allow(Vendorise::Arborist).to receive(:new).with("vendor/gems/vendorise", "git@github.com:New-Bamboo/vendorise.git").and_return(fake_arborist)
+
+ task.invoke("git@github.com:New-Bamboo/vendorise.git")
+
+ expect(File.exist?("foo.tmp")).to be true
+ File.delete("foo.tmp")
+ end
end
end