diff options
author | scott Chacon <schacon@agadorsparticus.(none)> | 2007-11-11 17:11:19 -0800 |
---|---|---|
committer | scott Chacon <schacon@agadorsparticus.(none)> | 2007-11-11 17:11:19 -0800 |
commit | 31b4f2b80616f570c83ed62d20f8b14ec5ba425b (patch) | |
tree | 57202ceb4c563ba5a53bc32e4c4e6ff90ecf7ba7 /tests/units/test_repack.rb | |
parent | 907b03949bab53e2f7d55094100a71abd22f23e7 (diff) | |
download | third_party-ruby-git-31b4f2b80616f570c83ed62d20f8b14ec5ba425b.tar.gz third_party-ruby-git-31b4f2b80616f570c83ed62d20f8b14ec5ba425b.tar.xz third_party-ruby-git-31b4f2b80616f570c83ed62d20f8b14ec5ba425b.zip |
adding my testing git directory
Diffstat (limited to 'tests/units/test_repack.rb')
-rw-r--r-- | tests/units/test_repack.rb | 30 |
1 files changed, 30 insertions, 0 deletions
diff --git a/tests/units/test_repack.rb b/tests/units/test_repack.rb new file mode 100644 index 0000000..605954f --- /dev/null +++ b/tests/units/test_repack.rb @@ -0,0 +1,30 @@ +#!/usr/bin/env ruby + +require File.dirname(__FILE__) + '/../test_helper' + +class TestRepack < Test::Unit::TestCase + def setup + set_file_paths + end + + def test_repack + in_temp_dir do |path| + r1 = Git.clone(@wbare, 'repo1') + + + r1.chdir do + new_file('new_file', 'new content') + end + r1.add + r1.commit('my commit') + + # see how big the repo is + size1 = r1.repo_size + + r1.repack + + # see how big the repo is now, should be smaller + assert(size1 > r1.repo_size) + end + end +end
\ No newline at end of file |