Skip to content
Browse files

Rename Integration module to MonkeyPatching.

This is a more honest name and it also frees up the Integration module
namespace for proper non-monkey-patching integration code.
  • Loading branch information...
1 parent 3131b8d commit 2334b922881125e5cd1a0ef77b25c81a13e91269 @floehopper floehopper committed Jul 26, 2012
Showing with 92 additions and 92 deletions.
  1. +1 −1 lib/mocha.rb
  2. +5 −5 lib/mocha/{integration.rb → monkey_patching.rb}
  3. +20 −20 lib/mocha/{integration → monkey_patching}/mini_test.rb
  4. +1 −1 lib/mocha/{integration → monkey_patching}/mini_test/assertion_counter.rb
  5. +1 −1 lib/mocha/{integration → monkey_patching}/mini_test/exception_translation.rb
  6. +4 −4 lib/mocha/{integration → monkey_patching}/mini_test/version_13.rb
  7. +4 −4 lib/mocha/{integration → monkey_patching}/mini_test/version_140.rb
  8. +4 −4 lib/mocha/{integration → monkey_patching}/mini_test/version_141.rb
  9. +4 −4 lib/mocha/{integration → monkey_patching}/mini_test/version_142_to_172.rb
  10. +4 −4 lib/mocha/{integration → monkey_patching}/mini_test/version_200.rb
  11. +4 −4 lib/mocha/{integration → monkey_patching}/mini_test/version_201_to_222.rb
  12. +4 −4 lib/mocha/{integration → monkey_patching}/mini_test/version_2110_to_2111.rb
  13. +4 −4 lib/mocha/{integration → monkey_patching}/mini_test/version_2112_to_320.rb
  14. +4 −4 lib/mocha/{integration → monkey_patching}/mini_test/version_230_to_2101.rb
  15. +13 −13 lib/mocha/{integration → monkey_patching}/test_unit.rb
  16. +1 −1 lib/mocha/{integration → monkey_patching}/test_unit/assertion_counter.rb
  17. +2 −2 lib/mocha/{integration → monkey_patching}/test_unit/gem_version_200.rb
  18. +2 −2 lib/mocha/{integration → monkey_patching}/test_unit/gem_version_201_to_202.rb
  19. +2 −2 lib/mocha/{integration → monkey_patching}/test_unit/gem_version_203_to_220.rb
  20. +2 −2 lib/mocha/{integration → monkey_patching}/test_unit/gem_version_230_to_251.rb
  21. +2 −2 lib/mocha/{integration → monkey_patching}/test_unit/ruby_version_185_and_below.rb
  22. +2 −2 lib/mocha/{integration → monkey_patching}/test_unit/ruby_version_186_and_above.rb
  23. +1 −1 test/acceptance/minitest_test.rb
  24. +1 −1 test/test_runner.rb
View
2 lib/mocha.rb
@@ -1,4 +1,4 @@
require 'mocha/version'
-require 'mocha/integration'
+require 'mocha/monkey_patching'
require 'mocha_standalone'
require 'mocha/configuration'
View
10 lib/mocha/integration.rb → lib/mocha/monkey_patching.rb
@@ -3,17 +3,17 @@
module Mocha
- module Integration
+ module MonkeyPatching
class << self
def monkey_patches
patches = []
if test_unit_testcase_defined? && !test_unit_testcase_inherits_from_miniunit_testcase?
- patches << 'mocha/integration/test_unit'
+ patches << 'mocha/monkey_patching/test_unit'
end
if mini_test_testcase_defined?
- patches << 'mocha/integration/mini_test'
+ patches << 'mocha/monkey_patching/mini_test'
end
patches
end
@@ -36,11 +36,11 @@ def test_unit_testcase_inherits_from_miniunit_testcase?
end
-unless Mocha::Integration.monkey_patches.any?
+unless Mocha::MonkeyPatching.monkey_patches.any?
Mocha::Deprecation.warning("Test::Unit or MiniTest must be loaded *before* Mocha.")
Mocha::Deprecation.warning("If you're integrating with another test library, you should probably require 'mocha_standalone' instead of 'mocha'")
end
-Mocha::Integration.monkey_patches.each do |patch|
+Mocha::MonkeyPatching.monkey_patches.each do |patch|
require patch
end
View
40 lib/mocha/integration/mini_test.rb → lib/mocha/monkey_patching/mini_test.rb
@@ -3,16 +3,16 @@
if !MiniTest::Unit::TestCase.ancestors.include?(Mocha::API)
- require 'mocha/integration/mini_test/exception_translation'
- require 'mocha/integration/mini_test/version_13'
- require 'mocha/integration/mini_test/version_140'
- require 'mocha/integration/mini_test/version_141'
- require 'mocha/integration/mini_test/version_142_to_172'
- require 'mocha/integration/mini_test/version_200'
- require 'mocha/integration/mini_test/version_201_to_222'
- require 'mocha/integration/mini_test/version_230_to_2101'
- require 'mocha/integration/mini_test/version_2110_to_2111'
- require 'mocha/integration/mini_test/version_2112_to_320'
+ require 'mocha/monkey_patching/mini_test/exception_translation'
+ require 'mocha/monkey_patching/mini_test/version_13'
+ require 'mocha/monkey_patching/mini_test/version_140'
+ require 'mocha/monkey_patching/mini_test/version_141'
+ require 'mocha/monkey_patching/mini_test/version_142_to_172'
+ require 'mocha/monkey_patching/mini_test/version_200'
+ require 'mocha/monkey_patching/mini_test/version_201_to_222'
+ require 'mocha/monkey_patching/mini_test/version_230_to_2101'
+ require 'mocha/monkey_patching/mini_test/version_2110_to_2111'
+ require 'mocha/monkey_patching/mini_test/version_2112_to_320'
module MiniTest
class Unit
@@ -32,25 +32,25 @@ class TestCase
$stderr.puts "Detected MiniTest version: #{mini_test_version}" if $mocha_options['debug']
if Gem::Requirement.new('>= 1.3.0', '<= 1.3.1').satisfied_by?(mini_test_version)
- include Mocha::Integration::MiniTest::Version13
+ include Mocha::MonkeyPatching::MiniTest::Version13
elsif Gem::Requirement.new('1.4.0').satisfied_by?(mini_test_version)
- include Mocha::Integration::MiniTest::Version140
+ include Mocha::MonkeyPatching::MiniTest::Version140
elsif Gem::Requirement.new('1.4.1').satisfied_by?(mini_test_version)
- include Mocha::Integration::MiniTest::Version141
+ include Mocha::MonkeyPatching::MiniTest::Version141
elsif Gem::Requirement.new('>= 1.4.2', '<= 1.7.2').satisfied_by?(mini_test_version)
- include Mocha::Integration::MiniTest::Version142To172
+ include Mocha::MonkeyPatching::MiniTest::Version142To172
elsif Gem::Requirement.new('2.0.0').satisfied_by?(mini_test_version)
- include Mocha::Integration::MiniTest::Version200
+ include Mocha::MonkeyPatching::MiniTest::Version200
elsif Gem::Requirement.new('>= 2.0.1', '<= 2.2.2').satisfied_by?(mini_test_version)
- include Mocha::Integration::MiniTest::Version201To222
+ include Mocha::MonkeyPatching::MiniTest::Version201To222
elsif Gem::Requirement.new('>= 2.3.0', '<= 2.10.1').satisfied_by?(mini_test_version)
- include Mocha::Integration::MiniTest::Version230To2101
+ include Mocha::MonkeyPatching::MiniTest::Version230To2101
elsif Gem::Requirement.new('>= 2.11.0', '<= 2.11.1').satisfied_by?(mini_test_version)
- include Mocha::Integration::MiniTest::Version2110To2111
+ include Mocha::MonkeyPatching::MiniTest::Version2110To2111
elsif Gem::Requirement.new('>= 2.11.2', '<= 3.2.0').satisfied_by?(mini_test_version)
- include Mocha::Integration::MiniTest::Version2112To320
+ include Mocha::MonkeyPatching::MiniTest::Version2112To320
else
- $stderr.puts "*** No Mocha integration for MiniTest version ***" if $mocha_options['debug']
+ $stderr.puts "*** No Mocha monkey-patch for MiniTest version ***" if $mocha_options['debug']
end
end
View
2 ...ntegration/mini_test/assertion_counter.rb → ...y_patching/mini_test/assertion_counter.rb
@@ -1,6 +1,6 @@
module Mocha
- module Integration
+ module MonkeyPatching
module MiniTest
View
2 ...ration/mini_test/exception_translation.rb → ...tching/mini_test/exception_translation.rb
@@ -2,7 +2,7 @@
module Mocha
- module Integration
+ module MonkeyPatching
module MiniTest
View
8 ...mocha/integration/mini_test/version_13.rb → ...a/monkey_patching/mini_test/version_13.rb
@@ -1,8 +1,8 @@
-require 'mocha/integration/mini_test/assertion_counter'
+require 'mocha/monkey_patching/mini_test/assertion_counter'
module Mocha
- module Integration
+ module MonkeyPatching
module MiniTest
@@ -22,12 +22,12 @@ def run runner
@passed = true
rescue Exception => e
@passed = false
- result = runner.puke(self.class, self.name, Mocha::Integration::MiniTest.translate(e))
+ result = runner.puke(self.class, self.name, Mocha::MonkeyPatching::MiniTest.translate(e))
ensure
begin
self.teardown
rescue Exception => e
- result = runner.puke(self.class, self.name, Mocha::Integration::MiniTest.translate(e))
+ result = runner.puke(self.class, self.name, Mocha::MonkeyPatching::MiniTest.translate(e))
end
end
ensure
View
8 ...ocha/integration/mini_test/version_140.rb → .../monkey_patching/mini_test/version_140.rb
@@ -1,9 +1,9 @@
-require 'mocha/integration/mini_test/assertion_counter'
+require 'mocha/monkey_patching/mini_test/assertion_counter'
require 'mocha/expectation_error'
module Mocha
- module Integration
+ module MonkeyPatching
module MiniTest
@@ -23,12 +23,12 @@ def run runner
@passed = true
rescue Exception => e
@passed = false
- result = runner.puke(self.class, self.__name__, Mocha::Integration::MiniTest.translate(e))
+ result = runner.puke(self.class, self.__name__, Mocha::MonkeyPatching::MiniTest.translate(e))
ensure
begin
self.teardown
rescue Exception => e
- result = runner.puke(self.class, self.__name__, Mocha::Integration::MiniTest.translate(e))
+ result = runner.puke(self.class, self.__name__, Mocha::MonkeyPatching::MiniTest.translate(e))
end
end
ensure
View
8 ...ocha/integration/mini_test/version_141.rb → .../monkey_patching/mini_test/version_141.rb
@@ -1,9 +1,9 @@
-require 'mocha/integration/mini_test/assertion_counter'
+require 'mocha/monkey_patching/mini_test/assertion_counter'
require 'mocha/expectation_error'
module Mocha
- module Integration
+ module MonkeyPatching
module MiniTest
@@ -31,14 +31,14 @@ def run runner
raise
rescue Exception => e
@passed = false
- result = runner.puke(self.class, self.__name__, Mocha::Integration::MiniTest.translate(e))
+ result = runner.puke(self.class, self.__name__, Mocha::MonkeyPatching::MiniTest.translate(e))
ensure
begin
self.teardown
rescue *::MiniTest::Unit::TestCase::PASSTHROUGH_EXCEPTIONS
raise
rescue Exception => e
- result = runner.puke(self.class, self.__name__, Mocha::Integration::MiniTest.translate(e))
+ result = runner.puke(self.class, self.__name__, Mocha::MonkeyPatching::MiniTest.translate(e))
end
trap 'INFO', 'DEFAULT'
end
View
8 ...tegration/mini_test/version_142_to_172.rb → ..._patching/mini_test/version_142_to_172.rb
@@ -1,9 +1,9 @@
-require 'mocha/integration/mini_test/assertion_counter'
+require 'mocha/monkey_patching/mini_test/assertion_counter'
require 'mocha/expectation_error'
module Mocha
- module Integration
+ module MonkeyPatching
module MiniTest
@@ -31,14 +31,14 @@ def run runner
raise
rescue Exception => e
@passed = false
- result = runner.puke(self.class, self.__name__, Mocha::Integration::MiniTest.translate(e))
+ result = runner.puke(self.class, self.__name__, Mocha::MonkeyPatching::MiniTest.translate(e))
ensure
begin
self.teardown
rescue *::MiniTest::Unit::TestCase::PASSTHROUGH_EXCEPTIONS
raise
rescue Exception => e
- result = runner.puke(self.class, self.__name__, Mocha::Integration::MiniTest.translate(e))
+ result = runner.puke(self.class, self.__name__, Mocha::MonkeyPatching::MiniTest.translate(e))
end
trap 'INFO', 'DEFAULT' if ::MiniTest::Unit::TestCase::SUPPORTS_INFO_SIGNAL
end
View
8 ...ocha/integration/mini_test/version_200.rb → .../monkey_patching/mini_test/version_200.rb
@@ -1,9 +1,9 @@
-require 'mocha/integration/mini_test/assertion_counter'
+require 'mocha/monkey_patching/mini_test/assertion_counter'
require 'mocha/expectation_error'
module Mocha
- module Integration
+ module MonkeyPatching
module MiniTest
@@ -32,14 +32,14 @@ def run runner
raise
rescue Exception => e
@passed = false
- result = runner.puke self.class, self.__name__, Mocha::Integration::MiniTest.translate(e)
+ result = runner.puke self.class, self.__name__, Mocha::MonkeyPatching::MiniTest.translate(e)
ensure
begin
self.teardown
rescue *::MiniTest::Unit::TestCase::PASSTHROUGH_EXCEPTIONS
raise
rescue Exception => e
- result = runner.puke self.class, self.__name__, Mocha::Integration::MiniTest.translate(e)
+ result = runner.puke self.class, self.__name__, Mocha::MonkeyPatching::MiniTest.translate(e)
end
trap 'INFO', 'DEFAULT' if ::MiniTest::Unit::TestCase::SUPPORTS_INFO_SIGNAL
end
View
8 ...tegration/mini_test/version_201_to_222.rb → ..._patching/mini_test/version_201_to_222.rb
@@ -1,9 +1,9 @@
-require 'mocha/integration/mini_test/assertion_counter'
+require 'mocha/monkey_patching/mini_test/assertion_counter'
require 'mocha/expectation_error'
module Mocha
- module Integration
+ module MonkeyPatching
module MiniTest
@@ -32,14 +32,14 @@ def run runner
raise
rescue Exception => e
@passed = false
- result = runner.puke self.class, self.__name__, Mocha::Integration::MiniTest.translate(e)
+ result = runner.puke self.class, self.__name__, Mocha::MonkeyPatching::MiniTest.translate(e)
ensure
begin
self.teardown
rescue *::MiniTest::Unit::TestCase::PASSTHROUGH_EXCEPTIONS
raise
rescue Exception => e
- result = runner.puke self.class, self.__name__, Mocha::Integration::MiniTest.translate(e)
+ result = runner.puke self.class, self.__name__, Mocha::MonkeyPatching::MiniTest.translate(e)
end
trap 'INFO', 'DEFAULT' if ::MiniTest::Unit::TestCase::SUPPORTS_INFO_SIGNAL
end
View
8 ...gration/mini_test/version_2110_to_2111.rb → ...atching/mini_test/version_2110_to_2111.rb
@@ -1,9 +1,9 @@
-require 'mocha/integration/mini_test/assertion_counter'
+require 'mocha/monkey_patching/mini_test/assertion_counter'
require 'mocha/expectation_error'
module Mocha
- module Integration
+ module MonkeyPatching
module MiniTest
@@ -34,15 +34,15 @@ def run runner
raise
rescue Exception => e
@passed = false
- result = runner.puke self.class, self.__name__, Mocha::Integration::MiniTest.translate(e)
+ result = runner.puke self.class, self.__name__, Mocha::MonkeyPatching::MiniTest.translate(e)
ensure
%w{ before_teardown teardown after_teardown }.each do |hook|
begin
self.send hook
rescue *::MiniTest::Unit::TestCase::PASSTHROUGH_EXCEPTIONS
raise
rescue Exception => e
- result = runner.puke self.class, self.__name__, Mocha::Integration::MiniTest.translate(e)
+ result = runner.puke self.class, self.__name__, Mocha::MonkeyPatching::MiniTest.translate(e)
end
end
trap 'INFO', 'DEFAULT' if ::MiniTest::Unit::TestCase::SUPPORTS_INFO_SIGNAL
View
8 ...egration/mini_test/version_2112_to_320.rb → ...patching/mini_test/version_2112_to_320.rb
@@ -1,9 +1,9 @@
-require 'mocha/integration/mini_test/assertion_counter'
+require 'mocha/monkey_patching/mini_test/assertion_counter'
require 'mocha/expectation_error'
module Mocha
- module Integration
+ module MonkeyPatching
module MiniTest
@@ -37,15 +37,15 @@ def run runner
raise
rescue Exception => e
@passed = false
- result = runner.puke self.class, self.__name__, Mocha::Integration::MiniTest.translate(e)
+ result = runner.puke self.class, self.__name__, Mocha::MonkeyPatching::MiniTest.translate(e)
ensure
%w{ before_teardown teardown after_teardown }.each do |hook|
begin
self.send hook
rescue *::MiniTest::Unit::TestCase::PASSTHROUGH_EXCEPTIONS
raise
rescue Exception => e
- result = runner.puke self.class, self.__name__, Mocha::Integration::MiniTest.translate(e)
+ result = runner.puke self.class, self.__name__, Mocha::MonkeyPatching::MiniTest.translate(e)
end
end
trap 'INFO', 'DEFAULT' if ::MiniTest::Unit::TestCase::SUPPORTS_INFO_SIGNAL
View
8 ...egration/mini_test/version_230_to_2101.rb → ...patching/mini_test/version_230_to_2101.rb
@@ -1,9 +1,9 @@
-require 'mocha/integration/mini_test/assertion_counter'
+require 'mocha/monkey_patching/mini_test/assertion_counter'
require 'mocha/expectation_error'
module Mocha
- module Integration
+ module MonkeyPatching
module MiniTest
@@ -33,15 +33,15 @@ def run runner
raise
rescue Exception => e
@passed = false
- result = runner.puke self.class, self.__name__, Mocha::Integration::MiniTest.translate(e)
+ result = runner.puke self.class, self.__name__, Mocha::MonkeyPatching::MiniTest.translate(e)
ensure
begin
self.run_teardown_hooks
self.teardown
rescue *::MiniTest::Unit::TestCase::PASSTHROUGH_EXCEPTIONS
raise
rescue Exception => e
- result = runner.puke self.class, self.__name__, Mocha::Integration::MiniTest.translate(e)
+ result = runner.puke self.class, self.__name__, Mocha::MonkeyPatching::MiniTest.translate(e)
end
trap 'INFO', 'DEFAULT' if ::MiniTest::Unit::TestCase::SUPPORTS_INFO_SIGNAL
end
View
26 lib/mocha/integration/test_unit.rb → lib/mocha/monkey_patching/test_unit.rb
@@ -3,12 +3,12 @@
if !Test::Unit::TestCase.ancestors.include?(Mocha::API)
- require 'mocha/integration/test_unit/gem_version_200'
- require 'mocha/integration/test_unit/gem_version_201_to_202'
- require 'mocha/integration/test_unit/gem_version_203_to_220'
- require 'mocha/integration/test_unit/gem_version_230_to_251'
- require 'mocha/integration/test_unit/ruby_version_185_and_below'
- require 'mocha/integration/test_unit/ruby_version_186_and_above'
+ require 'mocha/monkey_patching/test_unit/gem_version_200'
+ require 'mocha/monkey_patching/test_unit/gem_version_201_to_202'
+ require 'mocha/monkey_patching/test_unit/gem_version_203_to_220'
+ require 'mocha/monkey_patching/test_unit/gem_version_230_to_251'
+ require 'mocha/monkey_patching/test_unit/ruby_version_185_and_below'
+ require 'mocha/monkey_patching/test_unit/ruby_version_186_and_above'
module Test
module Unit
@@ -33,20 +33,20 @@ class TestCase
if (test_unit_version == Gem::Version.new('1.x')) || (test_unit_version == Gem::Version.new('1.2.3'))
if RUBY_VERSION < '1.8.6'
- include Mocha::Integration::TestUnit::RubyVersion185AndBelow
+ include Mocha::MonkeyPatching::TestUnit::RubyVersion185AndBelow
else
- include Mocha::Integration::TestUnit::RubyVersion186AndAbove
+ include Mocha::MonkeyPatching::TestUnit::RubyVersion186AndAbove
end
elsif Gem::Requirement.new('2.0.0').satisfied_by?(test_unit_version)
- include Mocha::Integration::TestUnit::GemVersion200
+ include Mocha::MonkeyPatching::TestUnit::GemVersion200
elsif Gem::Requirement.new('>= 2.0.1', '<= 2.0.2').satisfied_by?(test_unit_version)
- include Mocha::Integration::TestUnit::GemVersion201To202
+ include Mocha::MonkeyPatching::TestUnit::GemVersion201To202
elsif Gem::Requirement.new('>= 2.0.3', '<= 2.2.0').satisfied_by?(test_unit_version)
- include Mocha::Integration::TestUnit::GemVersion203To220
+ include Mocha::MonkeyPatching::TestUnit::GemVersion203To220
elsif Gem::Requirement.new('>= 2.3.0', '<= 2.5.1').satisfied_by?(test_unit_version)
- include Mocha::Integration::TestUnit::GemVersion230To251
+ include Mocha::MonkeyPatching::TestUnit::GemVersion230To251
else
- $stderr.puts "*** No Mocha integration for Test::Unit version ***" if $mocha_options['debug']
+ $stderr.puts "*** No Mocha monkey-patch for Test::Unit version ***" if $mocha_options['debug']
end
end
View
2 ...ntegration/test_unit/assertion_counter.rb → ...y_patching/test_unit/assertion_counter.rb
@@ -1,6 +1,6 @@
module Mocha
- module Integration
+ module MonkeyPatching
module TestUnit
View
4 .../integration/test_unit/gem_version_200.rb → ...key_patching/test_unit/gem_version_200.rb
@@ -1,10 +1,10 @@
require 'test/unit/testcase'
-require 'mocha/integration/test_unit/assertion_counter'
+require 'mocha/monkey_patching/test_unit/assertion_counter'
require 'mocha/expectation_error'
module Mocha
- module Integration
+ module MonkeyPatching
module TestUnit
View
4 ...ation/test_unit/gem_version_201_to_202.rb → ...ching/test_unit/gem_version_201_to_202.rb
@@ -1,10 +1,10 @@
require 'test/unit/testcase'
-require 'mocha/integration/test_unit/assertion_counter'
+require 'mocha/monkey_patching/test_unit/assertion_counter'
require 'mocha/expectation_error'
module Mocha
- module Integration
+ module MonkeyPatching
module TestUnit
View
4 ...ation/test_unit/gem_version_203_to_220.rb → ...ching/test_unit/gem_version_203_to_220.rb
@@ -1,10 +1,10 @@
require 'test/unit/testcase'
-require 'mocha/integration/test_unit/assertion_counter'
+require 'mocha/monkey_patching/test_unit/assertion_counter'
require 'mocha/expectation_error'
module Mocha
- module Integration
+ module MonkeyPatching
module TestUnit
View
4 ...ation/test_unit/gem_version_230_to_251.rb → ...ching/test_unit/gem_version_230_to_251.rb
@@ -1,10 +1,10 @@
require 'test/unit/testcase'
-require 'mocha/integration/test_unit/assertion_counter'
+require 'mocha/monkey_patching/test_unit/assertion_counter'
require 'mocha/expectation_error'
module Mocha
- module Integration
+ module MonkeyPatching
module TestUnit
View
4 ...n/test_unit/ruby_version_185_and_below.rb → ...g/test_unit/ruby_version_185_and_below.rb
@@ -1,10 +1,10 @@
require 'test/unit/testcase'
-require 'mocha/integration/test_unit/assertion_counter'
+require 'mocha/monkey_patching/test_unit/assertion_counter'
require 'mocha/expectation_error'
module Mocha
- module Integration
+ module MonkeyPatching
module TestUnit
View
4 ...n/test_unit/ruby_version_186_and_above.rb → ...g/test_unit/ruby_version_186_and_above.rb
@@ -1,10 +1,10 @@
require 'test/unit/testcase'
-require 'mocha/integration/test_unit/assertion_counter'
+require 'mocha/monkey_patching/test_unit/assertion_counter'
require 'mocha/expectation_error'
module Mocha
- module Integration
+ module MonkeyPatching
module TestUnit
View
2 test/acceptance/minitest_test.rb
@@ -19,7 +19,7 @@
if defined?(MiniTest)
# monkey-patch MiniTest now that it has hopefully been loaded
- require 'mocha/integration/mini_test'
+ require 'mocha/monkey_patching/mini_test'
class MiniTestSampleTest < MiniTest::Unit::TestCase
View
2 test/test_runner.rb
@@ -1,7 +1,7 @@
require 'test/unit/testcase'
if defined?(MiniTest)
- require 'mocha/integration/mini_test'
+ require 'mocha/monkey_patching/mini_test'
require File.expand_path('../mini_test_result', __FILE__)
else
require File.expand_path('../test_unit_result', __FILE__)

3 comments on commit 2334b92

@linki
linki commented on 2334b92 Aug 2, 2012

just ran into a problem with release 0.12.2 because of that commit. seems like activesupport 2.3.14 directly uses Mocha::Integration which was renamed here

see this file: https://github.com/rails/rails/blob/v2.3.14/activesupport/lib/active_support/testing/setup_and_teardown.rb#L51

sticking with 0.12.1 works fine

@chrisroos
Go Free Range member

Thanks for pointing this out and apologies for the unintentional breaking change we've introduced. As you've already found, sticking with 0.12.1 is the best bet for now and we'll work out how best to solve this in the next few days.

This has also been reported in #94. It's worth noting, as per my comment on that issue, that this only affects people using Rails with test/unit or the test-unit gem.

What version of ruby are you using, out of interest?

@linki
linki commented on 2334b92 Aug 3, 2012

no worries

ruby 1.8.7 (2012-06-29 patchlevel 370)

Please sign in to comment.
Something went wrong with that request. Please try again.