summaryrefslogtreecommitdiffstats
path: root/tests/units
diff options
context:
space:
mode:
authorscott Chacon <schacon@agadorsparticus.corp.reactrix.com>2007-11-12 17:58:02 -0800
committerscott Chacon <schacon@agadorsparticus.corp.reactrix.com>2007-11-12 17:58:02 -0800
commitf590869eaa6a4c7f25a1df8eca171a119fcee7ed (patch)
treea946f572fc3c9f6cbaef60331a2c6ef7db2b86f1 /tests/units
parent852a0e63d294de874c3311f5e7edf40e2f2ecd60 (diff)
downloadthird_party-ruby-git-f590869eaa6a4c7f25a1df8eca171a119fcee7ed.zip
third_party-ruby-git-f590869eaa6a4c7f25a1df8eca171a119fcee7ed.tar.gz
third_party-ruby-git-f590869eaa6a4c7f25a1df8eca171a119fcee7ed.tar.xz
added the tree functions and tests
Diffstat (limited to 'tests/units')
-rw-r--r--tests/units/test_object.rb7
1 files changed, 7 insertions, 0 deletions
diff --git a/tests/units/test_object.rb b/tests/units/test_object.rb
index c4a2de7..8b98e98 100644
--- a/tests/units/test_object.rb
+++ b/tests/units/test_object.rb
@@ -59,6 +59,13 @@ class TestObject < Test::Unit::TestCase
o = @git.object('1cc8667014381^{tree}')
assert(o.is_a?(Git::Object::Tree))
+ o = @git.object('v2.7^{tree}')
+
+ assert_equal(2, o.children.size)
+ assert_equal(1, o.blobs.size)
+ assert_equal(1, o.subtrees.size)
+ assert_equal(1, o.trees['ex_dir'].blobs.size)
+
o = @git.object('94c827875e2cadb8bc8d4cdd900f19aa9e8634c7')
assert(o.is_a?(Git::Object::Tree))
assert_equal('tree', o.type)