Actions
Patch #32592
closedRequire 'mocha/minitest' instead of deprecated 'mocha/setup'
Description
The following deprecation warning is shown when running tests if mocha 1.10.0 or later is installed.
Mocha deprecation warning at /path/to/gems/ruby/2.3.0/gems/activesupport-5.2.3/lib/active_support/dependencies.rb:291:in `require': Require 'mocha/test_unit', 'mocha/minitest' or 'mocha/api' instead of 'mocha/setup'.
It can be fixed with the following patch.
diff --git a/test/test_helper.rb b/test/test_helper.rb
index 68e292848..0c1217fea 100644
--- a/test/test_helper.rb
+++ b/test/test_helper.rb
@@ -35,7 +35,7 @@ require File.expand_path(File.dirname(__FILE__) + '/object_helpers')
include ObjectHelpers
require 'net/ldap'
-require 'mocha/setup'
+require 'mocha/minitest'
require 'fileutils'
Redmine::SudoMode.disable!
Files
Actions