public
Description: The Git TextMate Bundle
Homepage: http://tim.theenchanter.com/
Clone URL: git://github.com/timcharper/git-tmbundle.git
additional spec to check that Git#auto_add_rm is properly being called
timcharper (author)
Fri Jun 13 14:20:29 -0700 2008
commit  40f7c1f14b02c99482bd0aef137315756b669469
tree    1285ceba412f242b43892b0ebdfbcbe6ef3ea5a2
parent  f6b835ecbfc1abb875ce5a39579f59854db0f140
...
104
105
106
 
 
 
 
 
 
 
 
 
 
 
 
 
107
108
...
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
0
@@ -104,5 +104,18 @@ describe CommitController do
0
       end
0
       output.should include(@merge_message)
0
     end
0
+
0
+ it "should resolve auto add/rm merged files" do
0
+ @merge_message = "Merged"
0
+ @git.should_receive(:status).and_return([
0
+ {:path => "/base/file.yml", :status => {:short => "M", :long => "modified", :foreground =>"#eb6400", :background=>"#f7e1ad"}, :display=> "file.yml"},
0
+ {:path => "/base/deleted_file.yml", :status => {:short => "G", :long => "merged", :foreground =>"#eb6400", :background=>"#f7e1ad"}, :display=> "deleted_file.yml"}
0
+ ])
0
+ @git.should_receive(:auto_add_rm).with(["deleted_file.yml"])
0
+ output = capture_output do
0
+ dispatch(:controller => "commit", :action => "merge_commit", :message => @merge_message)
0
+ end
0
+ output.should include(@merge_message)
0
+ end
0
   end
0
 end

Comments

    No one has commented yet.