public
Rubygem
Description: Simple tool to help track git and svn vendor branches in a git repository
Homepage: http://github.com/evilchelu/braid/wikis/home
Clone URL: git://github.com/evilchelu/braid.git
add tests for .braids change when adding
evilchelu (author)
Sun Jul 20 20:45:39 -0700 2008
commit  a359f16a7ec6705bf5f1fe0cb138ea3d9d3f998c
tree    e3441434e483a523ff3d1276c68ea45ecca55c9d
parent  0d77e1e840c851b114595f5de968f92c82f7b3e1
...
27
28
29
 
 
 
 
 
 
 
 
 
 
 
 
 
30
31
32
...
48
49
50
51
52
 
 
 
 
53
 
 
 
 
 
 
 
 
54
55
56
...
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
...
61
62
63
 
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
0
@@ -27,6 +27,19 @@ describe "Adding a mirror in a clean repository" do
0
       output.length.should == 2
0
       output[0].should =~ "Add mirror 'skit1/'"
0
     end
0
+
0
+    it "should create .braids and add the mirror to it" do
0
+      in_dir(@shiny) do
0
+        `braid add --type git #{@skit1}`
0
+      end
0
+
0
+      braids = YAML::load_file("#{@shiny}/.braids")
0
+      braids["skit1"]["squashed"].should == true
0
+      braids["skit1"]["url"].should == @skit1
0
+      braids["skit1"]["type"].should == "git"
0
+      braids["skit1"]["branch"].should == "master"
0
+      braids["skit1"]["remote"].should == "braid/git/skit1/master"
0
+    end
0
   end
0
 
0
   describe "from an svn repository" do
0
@@ -48,9 +61,20 @@ describe "Adding a mirror in a clean repository" do
0
       output.length.should == 2
0
       output[0].should =~ "Add mirror 'skit1/'"
0
     end
0
-  end
0
 
0
+    it "should create .braids and add the mirror to it" do
0
+      in_dir(@shiny) do
0
+        `braid add --type svn #{@skit1}`
0
+      end
0
 
0
+      braids = YAML::load_file("#{@shiny}/.braids")
0
+      braids["skit1"]["squashed"].should == true
0
+      braids["skit1"]["url"].should == @skit1
0
+      braids["skit1"]["type"].should == "svn"
0
+      braids["skit1"]["revision"].should == 1
0
+      braids["skit1"]["remote"].should == "braid/svn/skit1"
0
+    end
0
+  end
0
 
0
 end
0
 

Comments