public
Description: The Git TextMate Bundle
Homepage: http://tim.theenchanter.com/
Clone URL: git://github.com/timcharper/git-tmbundle.git
refactored remote controller spec to not be less intimate with testing the 
git library
timcharper (author)
Fri Apr 04 21:45:23 -0700 2008
commit  88ed4ae73cbd930f66ce5dd8a1bfc2f632ef2726
tree    970516a3ec4395e8c4e3ecba397fa49ea54e3c6b
parent  31f8985a7d986b64c1fac10cab1dd2fb27f2a7f4
...
6
7
8
 
9
10
11
12
13
 
14
15
16
...
41
42
43
44
45
46
 
 
 
47
48
49
...
6
7
8
9
10
11
12
13
14
15
16
17
18
...
43
44
45
 
 
 
46
47
48
49
50
51
0
@@ -6,11 +6,13 @@ describe RemoteController do
0
   
0
   before(:each) do
0
     Git.reset_mock!
0
+ @git = Git.singleton_new
0
   end
0
   
0
   describe "fetching" do
0
     before(:each) do
0
       # query the sources
0
+ @git.config.stub!(:[]).with("branch.master.remote").and_return("origin")
0
       Git.command_response["branch"] = "* master\n"
0
       Git.command_response["config", "branch.master.remote"] = %Q{origin}
0
       Git.command_response["remote"] = %Q{origin}
0
@@ -41,9 +43,9 @@ describe RemoteController do
0
       # query the sources
0
       Git.command_response["branch"] = "* master\n"
0
       Git.command_response["branch", "-r"] = " origin/master\n origin/release\n"
0
- Git.command_response["config", "remote.origin.fetch"] = "+refs/heads/*:refs/remotes/origin/*"
0
- Git.command_response["config", "branch.master.remote"] = %Q{origin}
0
- Git.command_response["config", "branch.master.merge"] = %Q{refs/heads/master}
0
+ @git.config.stub!(:[]).with("remote.origin.fetch").and_return("+refs/heads/*:refs/remotes/origin/*")
0
+ @git.config.stub!(:[]).with("branch.master.remote").and_return('origin')
0
+ @git.config.stub!(:[]).with("branch.master.merge").and_return("refs/heads/master")
0
       Git.command_response["remote"] = %Q{origin}
0
     
0
       # query the config - if source != self["remote.#{current_branch}.remote"] || self["remote.#{current_branch}.merge"].nil?

Comments

    No one has commented yet.