From 763931d584e9aa9cd8c8ff0e8bd72d61b57da67c Mon Sep 17 00:00:00 2001 From: Toshi MARUYAMA Date: Fri, 13 May 2011 08:28:03 +0000 Subject: [PATCH] scm: git: use block to call revisions() in unit adapter test_revisions_branch_latin_1_path_encoding_all() (#7146). git-svn-id: svn+ssh://rubyforge.org/var/svn/redmine/trunk@5785 e93f8b46-1217-0410-a6f0-8f06a7374b81 --- .../lib/redmine/scm/adapters/git_adapter_test.rb | 12 +++++++++--- 1 file changed, 9 insertions(+), 3 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 df9375571..26dcb1c0e 100644 --- a/test/unit/lib/redmine/scm/adapters/git_adapter_test.rb +++ b/test/unit/lib/redmine/scm/adapters/git_adapter_test.rb @@ -145,13 +145,19 @@ begin end def test_revisions_branch_latin_1_path_encoding_all - revs1 = @adapter.revisions('', nil, "latin-1-path-encoding",{}) + revs1 = [] + @adapter.revisions('', nil, "latin-1-path-encoding",{}) do |rev| + revs1 << rev + end assert_equal 8, revs1.length assert_equal '1ca7f5ed374f3cb31a93ae5215c2e25cc6ec5127', revs1[ 0].identifier assert_equal '7234cb2750b63f47bff735edc50a1c0a433c2518', revs1[-1].identifier - revs2 = @adapter.revisions('', nil, "latin-1-path-encoding", - {:reverse => true}) + revs2 = [] + @adapter.revisions('', nil, "latin-1-path-encoding", + {:reverse => true}) do |rev| + revs2 << rev + end assert_equal 8, revs2.length assert_equal '1ca7f5ed374f3cb31a93ae5215c2e25cc6ec5127', revs2[-1].identifier assert_equal '7234cb2750b63f47bff735edc50a1c0a433c2518', revs2[ 0].identifier -- 2.39.5