]> source.dussan.org Git - redmine.git/commitdiff
Drop shoulda.
authorJean-Philippe Lang <jp_lang@yahoo.fr>
Sun, 30 Nov 2014 14:31:53 +0000 (14:31 +0000)
committerJean-Philippe Lang <jp_lang@yahoo.fr>
Sun, 30 Nov 2014 14:31:53 +0000 (14:31 +0000)
git-svn-id: http://svn.redmine.org/redmine/trunk@13676 e93f8b46-1217-0410-a6f0-8f06a7374b81

Gemfile
test/test_helper.rb
test/unit/mail_handler_test.rb
test/unit/project_test.rb

diff --git a/Gemfile b/Gemfile
index fce09bee54a76a7534bc73f4b9b4429af3d1b906..75d4f70bfa1a8299a9a48952162d0905d97a3fd7 100644 (file)
--- a/Gemfile
+++ b/Gemfile
@@ -86,7 +86,6 @@ end
 
 group :test do
   gem "minitest"
-  gem "shoulda-context"
   gem "mocha", "~> 1.0.0", :require => 'mocha/api'
   # For running UI tests
   gem "capybara", "~> 2.1.0"
index c66fd60f52820e94136fdb76f7e97b6e1cfcf788..b374a1422b69754cd3bb08f5d8636d5276a2c230 100644 (file)
@@ -15,7 +15,6 @@
 # along with this program; if not, write to the Free Software
 # Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301, USA.
 
-#require 'shoulda'
 ENV["RAILS_ENV"] = "test"
 require File.expand_path(File.dirname(__FILE__) + "/../config/environment")
 require 'rails/test_help'
@@ -34,9 +33,6 @@ end
 
 class ActiveSupport::TestCase
   include ActionDispatch::TestProcess
-  include Shoulda::Context::Assertions
-  include Shoulda::Context::InstanceMethods
-  extend Shoulda::Context::ClassMethods
 
   self.use_transactional_fixtures = true
   self.use_instantiated_fixtures  = false
index d774eeeddebce3cc73819219aff217fe4f643a7d..d18da5fabc9e7c69c1caf51099709c88b2ecd95c 100644 (file)
@@ -328,7 +328,7 @@ class MailHandlerTest < ActiveSupport::TestCase
       )
     end
     user = User.order('id DESC').first
-    assert_same_elements [group1, group2], user.groups
+    assert_equal [group1, group2].sort, user.groups.sort
   end
 
   def test_created_user_should_not_receive_account_information_with_no_account_info_option
index 62ecf5293e8d51ca34a40675b7f4206c4de2abcf..4723b4638c26ca4eccc35d0699e4e7e724a2f3fa 100644 (file)
@@ -481,7 +481,8 @@ class ProjectTest < ActiveSupport::TestCase
     project = Project.generate!
     parent_version_1 = Version.generate!(:project => project)
     parent_version_2 = Version.generate!(:project => project)
-    assert_same_elements [parent_version_1, parent_version_2], project.rolled_up_versions
+    assert_equal [parent_version_1, parent_version_2].sort,
+      project.rolled_up_versions.sort
   end
 
   test "#rolled_up_versions should include versions for a subproject" do
@@ -491,11 +492,8 @@ class ProjectTest < ActiveSupport::TestCase
     subproject = Project.generate_with_parent!(project)
     subproject_version = Version.generate!(:project => subproject)
 
-    assert_same_elements [
-                          parent_version_1,
-                          parent_version_2,
-                          subproject_version
-                         ], project.rolled_up_versions
+    assert_equal [parent_version_1, parent_version_2, subproject_version].sort,
+      project.rolled_up_versions.sort
   end
 
   test "#rolled_up_versions should include versions for a sub-subproject" do
@@ -507,11 +505,8 @@ class ProjectTest < ActiveSupport::TestCase
     sub_subproject_version = Version.generate!(:project => sub_subproject)
     project.reload
 
-    assert_same_elements [
-                          parent_version_1,
-                          parent_version_2,
-                          sub_subproject_version
-                         ], project.rolled_up_versions
+    assert_equal [parent_version_1, parent_version_2, sub_subproject_version].sort,
+      project.rolled_up_versions.sort
   end
 
   test "#rolled_up_versions should only check active projects" do
@@ -524,7 +519,8 @@ class ProjectTest < ActiveSupport::TestCase
     project.reload
 
     assert !subproject.active?
-    assert_same_elements [parent_version_1, parent_version_2], project.rolled_up_versions
+    assert_equal [parent_version_1, parent_version_2].sort,
+      project.rolled_up_versions.sort
   end
 
   def test_shared_versions_none_sharing