Skip to content

Commit b0b8ffd

Browse files
committed
Rewrite test_repack so it works in Windows
Signed-off-by: James Couball <jcouball@yahoo.com>
1 parent 27be99c commit b0b8ffd

File tree

1 file changed

+6
-8
lines changed

1 file changed

+6
-8
lines changed

tests/units/test_repack.rb

Lines changed: 6 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -3,20 +3,18 @@
33
require 'test_helper'
44

55
class TestRepack < Test::Unit::TestCase
6-
def test_repack
6+
test 'should be able to call repack with the right args' do
77
in_bare_repo_clone do |r1|
88
new_file('new_file', 'new content')
9-
109
r1.add
1110
r1.commit('my commit')
1211

13-
# see how big the repo is
14-
size1 = r1.repo_size
15-
16-
r1.repack
12+
# assert_nothing_raised { r1.repack }
1713

18-
# see how big the repo is now, should be smaller
19-
assert(size1 > r1.repo_size)
14+
expected_command_line = ['repack', '-a', '-d']
15+
git_cmd = :repack
16+
git_cmd_args = []
17+
assert_command_line(expected_command_line, git_cmd, git_cmd_args)
2018
end
2119
end
2220
end

0 commit comments

Comments
 (0)