]> source.dussan.org Git - redmine.git/commitdiff
scm: git: use block to call revisions() in unit adapter test_revisions_master_all...
authorToshi MARUYAMA <marutosijp2@yahoo.co.jp>
Fri, 13 May 2011 08:27:04 +0000 (08:27 +0000)
committerToshi MARUYAMA <marutosijp2@yahoo.co.jp>
Fri, 13 May 2011 08:27:04 +0000 (08:27 +0000)
git-svn-id: svn+ssh://rubyforge.org/var/svn/redmine/trunk@5783 e93f8b46-1217-0410-a6f0-8f06a7374b81

test/unit/lib/redmine/scm/adapters/git_adapter_test.rb

index 6b9c158d026493046b3315dc7b139f5ad32ac668..340b1283b4800f346d58d393945446f065f6bfc7 100644 (file)
@@ -93,13 +93,19 @@ begin
       end
 
       def test_revisions_master_all
-        revs1  = @adapter.revisions('', nil, "master",{})
+        revs1 = []
+        @adapter.revisions('', nil, "master",{}) do |rev|
+          revs1 << rev
+        end
         assert_equal 15, revs1.length
         assert_equal '83ca5fd546063a3c7dc2e568ba3355661a9e2b2c', revs1[ 0].identifier
         assert_equal '7234cb2750b63f47bff735edc50a1c0a433c2518', revs1[-1].identifier
 
-        revs2  = @adapter.revisions('', nil, "master",
-                                    {:reverse => true})
+        revs2 = []
+        @adapter.revisions('', nil, "master",
+                                    {:reverse => true}) do |rev|
+          revs2 << rev
+        end
         assert_equal 15, revs2.length
         assert_equal '83ca5fd546063a3c7dc2e568ba3355661a9e2b2c', revs2[-1].identifier
         assert_equal '7234cb2750b63f47bff735edc50a1c0a433c2518', revs2[ 0].identifier