]> source.dussan.org Git - redmine.git/commitdiff
fix functional projects controller test fails in Ruby 1.8.6.
authorToshi MARUYAMA <marutosijp2@yahoo.co.jp>
Sat, 16 Apr 2011 06:46:11 +0000 (06:46 +0000)
committerToshi MARUYAMA <marutosijp2@yahoo.co.jp>
Sat, 16 Apr 2011 06:46:11 +0000 (06:46 +0000)
Array#count is introduced in Ruby 1.8.7.

git-svn-id: svn+ssh://rubyforge.org/var/svn/redmine/trunk@5477 e93f8b46-1217-0410-a6f0-8f06a7374b81

test/functional/projects_controller_test.rb

index 45256f02c05559a67f1bd71cea586c4e978661c4..3d00b86341554b333a1549c4aba3cbbafdc3dab8 100644 (file)
@@ -483,7 +483,8 @@ class ProjectsControllerTest < ActionController::TestCase
     source = Project.find(1)
     assert_equal source.versions.count, project.versions.count, "All versions were not copied"
     # issues assigned to a closed version won't be copied
-    assert_equal source.issues.select {|i| i.fixed_version.nil? || i.fixed_version.open?}.count, project.issues.count, "All issues were not copied"
+    assert_equal source.issues.select {|i| i.fixed_version.nil? || i.fixed_version.open?}.size,
+                 project.issues.count, "All issues were not copied"
     assert_equal 0, project.members.count
   end