Permalink
Browse files

fix parents behavior in git acceptance

  • Loading branch information...
1 parent 5cd38cf commit 31487c8a0f06c1d28248bdba0137caf0de83bdad @comboy comboy committed Apr 3, 2012
Showing with 11 additions and 2 deletions.
  1. +1 −1 app/views/test_suite_runs/_summary.html.haml
  2. +10 −1 spec/acceptance/rails_test/git_spec.rb
@@ -1,7 +1,7 @@
- if tsr.exitstatus
%span.green PASSED
- else
- %span.red FAIL
+ %span.red FAILED
- unless tsr.tests_count.nil? && tsr.assertions_count.nil?
%b= tsr.tests_count
@@ -39,7 +39,16 @@
commit.description.should == "added test"
commit.committed_at.to_date.should == Date.new(2011,5,13)
- commit.parent.should == first_commit
+ commit.parents.should == [first_commit]
+ end
+
+ it "sholud assign parents properly for merge commits" do
+ commit = @project.commits.find_by_number("ac59aa698cb2a623cbb04a05dd3695178d424a3e")
+ p1 = @project.commits.find_by_number("f5879527d3c4e76261d2f47e3161ce2b01851d4b")
+ p1.description.should == "some master commit"
+ p2 = @project.commits.find_by_number("88ace409d165095fbbe85617415ced65a8592be5")
+ p2.description.should == "foo branch fix"
+ commit.parents.to_set.should == [p1,p2].to_set
end
it "should checkout properly" do

0 comments on commit 31487c8

Please sign in to comment.