Project

General

Profile

Actions

Patch #32592

closed

Require 'mocha/minitest' instead of deprecated 'mocha/setup'

Added by Go MAEDA almost 5 years ago. Updated almost 5 years ago.

Status:
Closed
Priority:
Normal
Assignee:
Category:
Gems support
Target version:
Start date:
Due date:
% Done:

0%

Estimated time:

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

32592-v2.patch (710 Bytes) 32592-v2.patch Go MAEDA, 2019-12-11 02:41
Actions

Also available in: Atom PDF