From 32b7d3d5f198a3ba81a5bba3a94ad04b69d9c1bf Mon Sep 17 00:00:00 2001 From: Rich Cavanaugh Date: Sun, 18 Oct 2009 11:37:52 -0400 Subject: [PATCH] spec the branch reassociating --- spec/branch_spec.rb | 12 ++++++++++++ 1 file changed, 12 insertions(+) diff --git a/spec/branch_spec.rb b/spec/branch_spec.rb index a0d9886..d425a79 100644 --- a/spec/branch_spec.rb +++ b/spec/branch_spec.rb @@ -18,6 +18,18 @@ class Project @project.should == @project.branch.branch_source end + it "should always tie the branch to the correct version" do + b = @project.branch! + @project.revise! + prev = @project.find_revision(:last) + b.reload.branch_source.should == prev + end + + it "should have branches" do + b = @project.branch! + @project.branches.size.should == 1 + end + it "should branch without saving" do @project.branch.should be_new_record end