@@ -24,7 +24,6 @@ def test_heads_should_return_array_of_head_objects(self):
2424
2525 @patch (Git , 'method_missing' )
2626 def test_heads_should_populate_head_data (self , git ):
27- # Git.any_instance.expects(:for_each_ref).returns(fixture('for_each_ref'))
2827 git .return_value = fixture ('for_each_ref' )
2928
3029 head = self .repo .heads [0 ]
@@ -36,7 +35,6 @@ def test_heads_should_populate_head_data(self, git):
3635
3736 @patch (Git , 'method_missing' )
3837 def test_commits (self , git ):
39- # Git.any_instance.expects(:rev_list).returns(fixture('rev_list'))
4038 git .return_value = fixture ('rev_list' )
4139
4240 commits = self .repo .commits ('master' , 10 )
@@ -65,7 +63,6 @@ def test_commits(self, git):
6563
6664 @patch (Git , 'method_missing' )
6765 def test_commit_count (self , git ):
68- # Git.any_instance.expects(:rev_list).with({}, 'master').returns(fixture('rev_list_count'))
6966 git .return_value = fixture ('rev_list_count' )
7067
7168 assert_equal (655 , self .repo .commit_count ('master' ))
@@ -86,7 +83,6 @@ def test_commit(self, git):
8683
8784 @patch (Git , 'method_missing' )
8885 def test_tree (self , git ):
89- # Git.any_instance.expects(:ls_tree).returns(fixture('ls_tree_a'))
9086 git .return_value = fixture ('ls_tree_a' )
9187
9288 tree = self .repo .tree ('master' )
@@ -99,7 +95,6 @@ def test_tree(self, git):
9995
10096 @patch (Git , 'method_missing' )
10197 def test_blob (self , git ):
102- # Git.any_instance.expects(:cat_file).returns(fixture('cat_file_blob'))
10398 git .return_value = fixture ('cat_file_blob' )
10499
105100 blob = self .repo .blob ("abc" )
@@ -111,8 +106,6 @@ def test_blob(self, git):
111106 @patch (Repo , '__init__' )
112107 @patch (Git , 'method_missing' )
113108 def test_init_bare (self , repo , git ):
114- # Git.any_instance.expects(:init).returns(true)
115- # Repo.expects(:new).with("/foo/bar.git")
116109 git .return_value = True
117110
118111 Repo .init_bare ("/foo/bar.git" )
@@ -125,9 +118,6 @@ def test_init_bare(self, repo, git):
125118 @patch (Repo , '__init__' )
126119 @patch (Git , 'method_missing' )
127120 def test_init_bare_with_options (self , repo , git ):
128- # Git.any_instance.expects(:init).with(
129- # :template => "/baz/sweet").returns(true)
130- # Repo.expects(:new).with("/foo/bar.git")
131121 git .return_value = True
132122
133123 Repo .init_bare ("/foo/bar.git" , ** {'template' : "/baz/sweet" })
@@ -140,11 +130,6 @@ def test_init_bare_with_options(self, repo, git):
140130 @patch (Repo , '__init__' )
141131 @patch (Git , 'method_missing' )
142132 def test_fork_bare (self , repo , git ):
143- # Git.any_instance.expects(:clone).with(
144- # {:bare => true, :shared => false},
145- # "#{absolute_project_path}/.git",
146- # "/foo/bar.git").returns(nil)
147- # Repo.expects(:new)
148133 git .return_value = None
149134
150135 self .repo .fork_bare ("/foo/bar.git" )
@@ -156,11 +141,6 @@ def test_fork_bare(self, repo, git):
156141 @patch (Repo , '__init__' )
157142 @patch (Git , 'method_missing' )
158143 def test_fork_bare_with_options (self , repo , git ):
159- # Git.any_instance.expects(:clone).with(
160- # {:bare => true, :shared => false, :template => '/awesome'},
161- # "#{absolute_project_path}/.git",
162- # "/foo/bar.git").returns(nil)
163- # Repo.expects(:new)
164144 git .return_value = None
165145
166146 self .repo .fork_bare ("/foo/bar.git" , ** {'template' : '/awesome' })
@@ -172,27 +152,23 @@ def test_fork_bare_with_options(self, repo, git):
172152
173153 @patch (Git , 'method_missing' )
174154 def test_diff (self , git ):
175- # Git.any_instance.expects(:diff).with({}, 'master^', 'master', '--')
176155 self .repo .diff ('master^' , 'master' )
177156
178157 assert_true (git .called )
179158 assert_equal (git .call_args , (('diff' , 'master^' , 'master' , '--' ), {}))
180159
181- # Git.any_instance.expects(:diff).with({}, 'master^', 'master', '--', 'foo/bar')
182160 self .repo .diff ('master^' , 'master' , 'foo/bar' )
183161
184162 assert_true (git .called )
185163 assert_equal (git .call_args , (('diff' , 'master^' , 'master' , '--' , 'foo/bar' ), {}))
186164
187- # Git.any_instance.expects(:diff).with({}, 'master^', 'master', '--', 'foo/bar', 'foo/baz')
188165 self .repo .diff ('master^' , 'master' , 'foo/bar' , 'foo/baz' )
189166
190167 assert_true (git .called )
191168 assert_equal (git .call_args , (('diff' , 'master^' , 'master' , '--' , 'foo/bar' , 'foo/baz' ), {}))
192169
193170 @patch (Git , 'method_missing' )
194171 def test_diff (self , git ):
195- # Git.any_instance.expects(:diff).returns(fixture('diff_p'))
196172 git .return_value = fixture ('diff_p' )
197173
198174 diffs = self .repo .commit_diff ('master' )
@@ -207,11 +183,9 @@ def test_archive_tar_gz(self):
207183
208184 @patch ('git_python.utils' , 'touch' )
209185 def test_enable_daemon_serve (self , touch ):
210- # FileUtils.expects(:touch).with(File.join(self.repo.path, '.git', 'git-daemon-export-ok'))
211186 self .repo .enable_daemon_serve
212187
213188 def test_disable_daemon_serve (self ):
214- # FileUtils.expects(:rm_f).with(File.join(self.repo.path, '.git', 'git-daemon-export-ok'))
215189 self .repo .disable_daemon_serve
216190
217191 # @patch(os.path, 'exists')
@@ -230,7 +204,6 @@ def test_disable_daemon_serve(self):
230204 @patch (os .path , 'exists' )
231205 def test_alternates_no_file (self , os ):
232206 os .return_value = False
233- # File.expects(:exist?).returns(false)
234207 assert_equal ([], self .repo .alternates )
235208
236209 assert_true (os .called )
0 commit comments