spec/git-autobisect_spec.rb in git-autobisect-0.2.0 vs spec/git-autobisect_spec.rb in git-autobisect-0.2.1

- old
+ new

@@ -79,9 +79,20 @@ 5.times{ add_irrelevant_commit } autobisect(command, :fail => true).should include("No good commit found") end end + context "--start" do + let(:command){ "'test -e a' --start 5" } + + it "starts at given point" do + remove_a + 30.times{ add_irrelevant_commit } + result = autobisect(command) + result.scan(/HEAD~\d+/).should == ["HEAD~4", "HEAD~9", "HEAD~19", "HEAD~31"] + end + end + it "finds the first broken commit for 1 commit" do remove_a result = autobisect("'test -e a'") result.should_not include("bisect run") result.should =~ /is the first bad commit.*remove a/m