From 39930c3f4d60052eb9da6f6d404d3e8bf3e85f43 Mon Sep 17 00:00:00 2001 From: Toshi MARUYAMA Date: Fri, 13 May 2011 08:28:30 +0000 Subject: [PATCH] scm: git: use block to call revisions() in unit adapter test_revisions_branch_latin_1_path_encoding_with_rev() (#7146). git-svn-id: svn+ssh://rubyforge.org/var/svn/redmine/trunk@5786 e93f8b46-1217-0410-a6f0-8f06a7374b81 --- .../redmine/scm/adapters/git_adapter_test.rb | 22 ++++++++++++------- 1 file changed, 14 insertions(+), 8 deletions(-) diff --git a/test/unit/lib/redmine/scm/adapters/git_adapter_test.rb b/test/unit/lib/redmine/scm/adapters/git_adapter_test.rb index 26dcb1c0e..06e14ea98 100644 --- a/test/unit/lib/redmine/scm/adapters/git_adapter_test.rb +++ b/test/unit/lib/redmine/scm/adapters/git_adapter_test.rb @@ -164,18 +164,24 @@ begin end def test_revisions_branch_latin_1_path_encoding_with_rev - revs1 = @adapter.revisions('', - '7234cb2750b63f47bff735edc50a1c0a433c2518', - "latin-1-path-encoding", - {:reverse => true}) + revs1 = [] + @adapter.revisions('', + '7234cb2750b63f47bff735edc50a1c0a433c2518', + "latin-1-path-encoding", + {:reverse => true}) do |rev| + revs1 << rev + end assert_equal 7, revs1.length assert_equal '899a15dba03a3b350b89c3f537e4bbe02a03cdc9', revs1[ 0].identifier assert_equal '1ca7f5ed374f3cb31a93ae5215c2e25cc6ec5127', revs1[-1].identifier - revs2 = @adapter.revisions('', - '57ca437c0acbbcb749821fdf3726a1367056d364', - "latin-1-path-encoding", - {:reverse => true}) + revs2 = [] + @adapter.revisions('', + '57ca437c0acbbcb749821fdf3726a1367056d364', + "latin-1-path-encoding", + {:reverse => true}) do |rev| + revs2 << rev + end assert_equal 3, revs2.length assert_equal '4fc55c43bf3d3dc2efb66145365ddc17639ce81e', revs2[ 0].identifier assert_equal '1ca7f5ed374f3cb31a93ae5215c2e25cc6ec5127', revs2[-1].identifier -- 2.39.5