summaryrefslogtreecommitdiffstats
path: root/test
diff options
context:
space:
mode:
authorToshi MARUYAMA <marutosijp2@yahoo.co.jp>2011-05-13 08:27:35 +0000
committerToshi MARUYAMA <marutosijp2@yahoo.co.jp>2011-05-13 08:27:35 +0000
commitd3d983093638ec0df4b835514f9186e15a4bfcd3 (patch)
treecf834d234e57997c4d963470bd596282913c6494 /test
parent5d8bb7904c7fb2631538b660a377ba9de42a39ba (diff)
downloadredmine-d3d983093638ec0df4b835514f9186e15a4bfcd3.tar.gz
redmine-d3d983093638ec0df4b835514f9186e15a4bfcd3.zip
scm: git: use block to call revisions() in unit adapter test_revisions_master_merged_rev() (#7146).
git-svn-id: svn+ssh://rubyforge.org/var/svn/redmine/trunk@5784 e93f8b46-1217-0410-a6f0-8f06a7374b81
Diffstat (limited to 'test')
-rw-r--r--test/unit/lib/redmine/scm/adapters/git_adapter_test.rb22
1 files 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 340b1283b..df9375571 100644
--- a/test/unit/lib/redmine/scm/adapters/git_adapter_test.rb
+++ b/test/unit/lib/redmine/scm/adapters/git_adapter_test.rb
@@ -112,10 +112,13 @@ begin
end
def test_revisions_master_merged_rev
- revs1 = @adapter.revisions('',
- "713f4944648826f558cf548222f813dabe7cbb04",
- "master",
- {:reverse => true})
+ revs1 = []
+ @adapter.revisions('',
+ "713f4944648826f558cf548222f813dabe7cbb04",
+ "master",
+ {:reverse => true}) do |rev|
+ revs1 << rev
+ end
assert_equal 8, revs1.length
assert_equal 'fba357b886984ee71185ad2065e65fc0417d9b92', revs1[ 0].identifier
assert_equal '7e61ac704deecde634b51e59daa8110435dcb3da', revs1[ 1].identifier
@@ -125,10 +128,13 @@ begin
assert_equal '32ae898b720c2f7eec2723d5bdd558b4cb2d3ddf', revs1[ 3].identifier
assert_equal '83ca5fd546063a3c7dc2e568ba3355661a9e2b2c', revs1[-1].identifier
- revs2 = @adapter.revisions('',
- "fba357b886984ee71185ad2065e65fc0417d9b92",
- "master",
- {:reverse => true})
+ revs2 = []
+ @adapter.revisions('',
+ "fba357b886984ee71185ad2065e65fc0417d9b92",
+ "master",
+ {:reverse => true}) do |rev|
+ revs2 << rev
+ end
assert_equal 7, revs2.length
assert_equal '7e61ac704deecde634b51e59daa8110435dcb3da', revs2[ 0].identifier
# 4a07fe31b is not a child of fba357b8869