spec/vendorer_spec.rb in vendorer-0.1.3 vs spec/vendorer_spec.rb in vendorer-0.1.4
- old
+ new
@@ -175,9 +175,29 @@
size('its_really_recursive/Gemfile').should == 3
size('its_recursive/Gemfile').should > 30
end
end
+ describe "git options" do
+ it "can checkout by :ref" do
+ write 'Vendorfile', "folder 'its_recursive', '../../.git', :ref => 'b1e6460'"
+ run
+ read('its_recursive/Readme.md').should include('CODE EXAMPLE')
+ end
+
+ it "can checkout by :branch" do
+ write 'Vendorfile', "folder 'its_recursive', '../../.git', :branch => 'b1e6460'"
+ run
+ read('its_recursive/Readme.md').should include('CODE EXAMPLE')
+ end
+
+ it "can checkout by :tag" do
+ write 'Vendorfile', "folder 'its_recursive', '../../.git', :tag => 'b1e6460'"
+ run
+ read('its_recursive/Readme.md').should include('CODE EXAMPLE')
+ end
+ end
+
context "with a passed block" do
before do
write 'Vendorfile', "folder('its_recursive', '../../.git'){|path| puts 'THE PATH IS ' + path }"
@output = 'THE PATH IS its_recursive'
end