summaryrefslogtreecommitdiffstats
path: root/tests/units
diff options
context:
space:
mode:
authorscott Chacon <schacon@agadorsparticus.(none)>2007-11-17 08:22:49 -0800
committerscott Chacon <schacon@agadorsparticus.(none)>2007-11-17 08:22:49 -0800
commitb0d47b3112b00cb6c1ae72d6d8a43e583af117ea (patch)
tree5d8094a62450a88ccc542a7a19e724004fdb8ca8 /tests/units
parentba0f3cc565d051e79db634dbff1f1d4c71291461 (diff)
downloadthird_party-ruby-git-b0d47b3112b00cb6c1ae72d6d8a43e583af117ea.zip
third_party-ruby-git-b0d47b3112b00cb6c1ae72d6d8a43e583af117ea.tar.gz
third_party-ruby-git-b0d47b3112b00cb6c1ae72d6d8a43e583af117ea.tar.xz
significantly improved log performance
Diffstat (limited to 'tests/units')
-rw-r--r--tests/units/test_lib.rb5
-rw-r--r--tests/units/test_log.rb7
-rw-r--r--tests/units/test_object.rb6
3 files changed, 6 insertions, 12 deletions
diff --git a/tests/units/test_lib.rb b/tests/units/test_lib.rb
index 5afb4ec..9a3479b 100644
--- a/tests/units/test_lib.rb
+++ b/tests/units/test_lib.rb
@@ -42,10 +42,7 @@ class TestLib < Test::Unit::TestCase
a = @lib.log_commits :count => 20, :between => ['v2.5', 'v2.6']
assert_equal(2, a.size)
- a = @lib.log_commits :count => 20, :object => 'example.txt'
- assert_equal(20, a.size)
-
- a = @lib.log_commits :count => 20, :object => 'ex_dir/ex.txt'
+ a = @lib.log_commits :count => 20, :path_limiter => 'ex_dir/'
assert_equal(1, a.size)
end
diff --git a/tests/units/test_log.rb b/tests/units/test_log.rb
index 7198b8a..5b41f39 100644
--- a/tests/units/test_log.rb
+++ b/tests/units/test_log.rb
@@ -32,13 +32,10 @@ class TestLog < Test::Unit::TestCase
end
def test_get_log_since_file
- l = @git.log.object('example.txt')
+ l = @git.log.path('example.txt')
assert_equal(30, l.size)
-
- l = @git.log.between('v2.5').object('example.txt')
- assert_equal(3, l.size)
- l = @git.log.between('v2.5', 'test').object('example.txt')
+ l = @git.log.between('v2.5', 'test').path('example.txt')
assert_equal(1, l.size)
end
diff --git a/tests/units/test_object.rb b/tests/units/test_object.rb
index 5b04054..a574919 100644
--- a/tests/units/test_object.rb
+++ b/tests/units/test_object.rb
@@ -50,9 +50,9 @@ class TestObject < Test::Unit::TestCase
end
def test_object_to_s
- assert_equal('1cc8667014381e2788a94777532a788307f38d26', @commit.to_s)
- assert_equal('94c827875e2cadb8bc8d4cdd900f19aa9e8634c7', @tree.to_s)
- assert_equal('ba492c62b6227d7f3507b4dcc6e6d5f13790eabf', @blob.to_s)
+ assert_equal('1cc8667014381e2788a94777532a788307f38d26', @commit.sha)
+ assert_equal('94c827875e2cadb8bc8d4cdd900f19aa9e8634c7', @tree.sha)
+ assert_equal('ba492c62b6227d7f3507b4dcc6e6d5f13790eabf', @blob.sha)
end
def test_object_size