diff options
author | Toshi MARUYAMA <marutosijp2@yahoo.co.jp> | 2011-05-13 08:27:04 +0000 |
---|---|---|
committer | Toshi MARUYAMA <marutosijp2@yahoo.co.jp> | 2011-05-13 08:27:04 +0000 |
commit | 5d8bb7904c7fb2631538b660a377ba9de42a39ba (patch) | |
tree | 18e770cdf2d0c685f8a9ab5f239c5c3051325a13 /test | |
parent | 2cab592b2056c27c764ea407f4db60780563ad6e (diff) | |
download | redmine-5d8bb7904c7fb2631538b660a377ba9de42a39ba.tar.gz redmine-5d8bb7904c7fb2631538b660a377ba9de42a39ba.zip |
scm: git: use block to call revisions() in unit adapter test_revisions_master_all() (#7146).
git-svn-id: svn+ssh://rubyforge.org/var/svn/redmine/trunk@5783 e93f8b46-1217-0410-a6f0-8f06a7374b81
Diffstat (limited to 'test')
-rw-r--r-- | test/unit/lib/redmine/scm/adapters/git_adapter_test.rb | 12 |
1 files 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 6b9c158d0..340b1283b 100644 --- a/test/unit/lib/redmine/scm/adapters/git_adapter_test.rb +++ b/test/unit/lib/redmine/scm/adapters/git_adapter_test.rb @@ -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 |