From 36adf880a0b9302fb5e770161c2e962e7e20fe71 Mon Sep 17 00:00:00 2001 From: James Mead Date: Sun, 3 Nov 2019 13:35:17 +0000 Subject: [PATCH] Deprecate requiring 'mocha/setup' By forcing people to require the explicit integrations for Test::Unit or Minitest, we will be able to provide more useful feedback if the integration fails for some reason. Note that requiring 'mocha/setup' was removed from the README in the v1.0.0 release [1]. [1]: https://github.com/freerange/mocha/commit/1d6b08f0c802a64f20464a4f2fa2ef6861deb9c8 --- lib/mocha/setup.rb | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/lib/mocha/setup.rb b/lib/mocha/setup.rb index 70e6a09d2..0566fcde0 100644 --- a/lib/mocha/setup.rb +++ b/lib/mocha/setup.rb @@ -1,4 +1,9 @@ require 'mocha/integration' +require 'mocha/deprecation' + +Mocha::Deprecation.warning( + "Use `require 'mocha/test_unit'` or `require 'mocha/minitest'` instead." +) module Mocha def self.activate