adding my testing git directory
[rubygit.git] / tests / units / test_repack.rb
blob605954fac4a55dceb34dc64e184a6f5c7f518e57
1 #!/usr/bin/env ruby
3 require File.dirname(__FILE__) + '/../test_helper'
5 class TestRepack < Test::Unit::TestCase
6   def setup
7     set_file_paths
8   end
9   
10   def test_repack
11     in_temp_dir do |path|
12       r1 = Git.clone(@wbare, 'repo1')
13         
15       r1.chdir do 
16         new_file('new_file', 'new content')
17       end
18       r1.add
19       r1.commit('my commit')
21       # see how big the repo is      
22       size1 = r1.repo_size
24       r1.repack
25       
26       # see how big the repo is now, should be smaller
27       assert(size1 > r1.repo_size)      
28     end
29   end
30 end