mocha 0.12.2 → 0.12.3

Sign up to get free protection for your applications and to get access to all the features.
Files changed (28) hide show
  1. data/RELEASE.rdoc +3 -0
  2. data/lib/mocha.rb +1 -1
  3. data/lib/mocha/{monkey_patching.rb → integration.rb} +5 -5
  4. data/lib/mocha/{monkey_patching → integration}/mini_test.rb +21 -21
  5. data/lib/mocha/{monkey_patching → integration}/mini_test/assertion_counter.rb +1 -1
  6. data/lib/mocha/{monkey_patching → integration}/mini_test/exception_translation.rb +1 -1
  7. data/lib/mocha/{monkey_patching → integration}/mini_test/version_13.rb +4 -4
  8. data/lib/mocha/{monkey_patching → integration}/mini_test/version_140.rb +4 -4
  9. data/lib/mocha/{monkey_patching → integration}/mini_test/version_141.rb +4 -4
  10. data/lib/mocha/{monkey_patching → integration}/mini_test/version_142_to_172.rb +4 -4
  11. data/lib/mocha/{monkey_patching → integration}/mini_test/version_200.rb +4 -4
  12. data/lib/mocha/{monkey_patching → integration}/mini_test/version_201_to_222.rb +4 -4
  13. data/lib/mocha/{monkey_patching → integration}/mini_test/version_2110_to_2111.rb +4 -4
  14. data/lib/mocha/{monkey_patching → integration}/mini_test/version_2112_to_320.rb +4 -4
  15. data/lib/mocha/{monkey_patching → integration}/mini_test/version_230_to_2101.rb +4 -4
  16. data/lib/mocha/{monkey_patching → integration}/mini_test/version_330.rb +4 -4
  17. data/lib/mocha/{monkey_patching → integration}/test_unit.rb +12 -12
  18. data/lib/mocha/{monkey_patching → integration}/test_unit/assertion_counter.rb +1 -1
  19. data/lib/mocha/{monkey_patching → integration}/test_unit/gem_version_200.rb +2 -2
  20. data/lib/mocha/{monkey_patching → integration}/test_unit/gem_version_201_to_202.rb +2 -2
  21. data/lib/mocha/{monkey_patching → integration}/test_unit/gem_version_203_to_220.rb +2 -2
  22. data/lib/mocha/{monkey_patching → integration}/test_unit/gem_version_230_to_251.rb +2 -2
  23. data/lib/mocha/{monkey_patching → integration}/test_unit/ruby_version_185_and_below.rb +2 -2
  24. data/lib/mocha/{monkey_patching → integration}/test_unit/ruby_version_186_and_above.rb +2 -2
  25. data/lib/mocha/version.rb +1 -1
  26. data/test/acceptance/minitest_test.rb +1 -1
  27. data/test/test_runner.rb +1 -1
  28. metadata +33 -33
@@ -1,3 +1,6 @@
1
+ = 0.12.3
2
+ * Revert rename of undocumented internal module since it turns out Rails/ActiveSupport is relying on its existence.
3
+
1
4
  = 0.12.2
2
5
  * Officially support minitest v3.3.0 (still monkey-patching)
3
6
 
@@ -1,4 +1,4 @@
1
1
  require 'mocha/version'
2
- require 'mocha/monkey_patching'
2
+ require 'mocha/integration'
3
3
  require 'mocha_standalone'
4
4
  require 'mocha/configuration'
@@ -3,17 +3,17 @@ require 'mocha/deprecation'
3
3
 
4
4
  module Mocha
5
5
 
6
- module MonkeyPatching
6
+ module Integration
7
7
 
8
8
  class << self
9
9
 
10
10
  def monkey_patches
11
11
  patches = []
12
12
  if test_unit_testcase_defined? && !test_unit_testcase_inherits_from_miniunit_testcase?
13
- patches << 'mocha/monkey_patching/test_unit'
13
+ patches << 'mocha/integration/test_unit'
14
14
  end
15
15
  if mini_test_testcase_defined?
16
- patches << 'mocha/monkey_patching/mini_test'
16
+ patches << 'mocha/integration/mini_test'
17
17
  end
18
18
  patches
19
19
  end
@@ -36,11 +36,11 @@ module Mocha
36
36
 
37
37
  end
38
38
 
39
- unless Mocha::MonkeyPatching.monkey_patches.any?
39
+ unless Mocha::Integration.monkey_patches.any?
40
40
  Mocha::Deprecation.warning("Test::Unit or MiniTest must be loaded *before* Mocha.")
41
41
  Mocha::Deprecation.warning("If you're integrating with another test library, you should probably require 'mocha_standalone' instead of 'mocha'")
42
42
  end
43
43
 
44
- Mocha::MonkeyPatching.monkey_patches.each do |patch|
44
+ Mocha::Integration.monkey_patches.each do |patch|
45
45
  require patch
46
46
  end
@@ -3,17 +3,17 @@ require 'mocha/options'
3
3
 
4
4
  if !MiniTest::Unit::TestCase.ancestors.include?(Mocha::API)
5
5
 
6
- require 'mocha/monkey_patching/mini_test/exception_translation'
7
- require 'mocha/monkey_patching/mini_test/version_13'
8
- require 'mocha/monkey_patching/mini_test/version_140'
9
- require 'mocha/monkey_patching/mini_test/version_141'
10
- require 'mocha/monkey_patching/mini_test/version_142_to_172'
11
- require 'mocha/monkey_patching/mini_test/version_200'
12
- require 'mocha/monkey_patching/mini_test/version_201_to_222'
13
- require 'mocha/monkey_patching/mini_test/version_230_to_2101'
14
- require 'mocha/monkey_patching/mini_test/version_2110_to_2111'
15
- require 'mocha/monkey_patching/mini_test/version_2112_to_320'
16
- require 'mocha/monkey_patching/mini_test/version_330'
6
+ require 'mocha/integration/mini_test/exception_translation'
7
+ require 'mocha/integration/mini_test/version_13'
8
+ require 'mocha/integration/mini_test/version_140'
9
+ require 'mocha/integration/mini_test/version_141'
10
+ require 'mocha/integration/mini_test/version_142_to_172'
11
+ require 'mocha/integration/mini_test/version_200'
12
+ require 'mocha/integration/mini_test/version_201_to_222'
13
+ require 'mocha/integration/mini_test/version_230_to_2101'
14
+ require 'mocha/integration/mini_test/version_2110_to_2111'
15
+ require 'mocha/integration/mini_test/version_2112_to_320'
16
+ require 'mocha/integration/mini_test/version_330'
17
17
 
18
18
  module MiniTest
19
19
  class Unit
@@ -33,25 +33,25 @@ if !MiniTest::Unit::TestCase.ancestors.include?(Mocha::API)
33
33
  $stderr.puts "Detected MiniTest version: #{mini_test_version}" if $mocha_options['debug']
34
34
 
35
35
  if Gem::Requirement.new('>= 1.3.0', '<= 1.3.1').satisfied_by?(mini_test_version)
36
- include Mocha::MonkeyPatching::MiniTest::Version13
36
+ include Mocha::Integration::MiniTest::Version13
37
37
  elsif Gem::Requirement.new('1.4.0').satisfied_by?(mini_test_version)
38
- include Mocha::MonkeyPatching::MiniTest::Version140
38
+ include Mocha::Integration::MiniTest::Version140
39
39
  elsif Gem::Requirement.new('1.4.1').satisfied_by?(mini_test_version)
40
- include Mocha::MonkeyPatching::MiniTest::Version141
40
+ include Mocha::Integration::MiniTest::Version141
41
41
  elsif Gem::Requirement.new('>= 1.4.2', '<= 1.7.2').satisfied_by?(mini_test_version)
42
- include Mocha::MonkeyPatching::MiniTest::Version142To172
42
+ include Mocha::Integration::MiniTest::Version142To172
43
43
  elsif Gem::Requirement.new('2.0.0').satisfied_by?(mini_test_version)
44
- include Mocha::MonkeyPatching::MiniTest::Version200
44
+ include Mocha::Integration::MiniTest::Version200
45
45
  elsif Gem::Requirement.new('>= 2.0.1', '<= 2.2.2').satisfied_by?(mini_test_version)
46
- include Mocha::MonkeyPatching::MiniTest::Version201To222
46
+ include Mocha::Integration::MiniTest::Version201To222
47
47
  elsif Gem::Requirement.new('>= 2.3.0', '<= 2.10.1').satisfied_by?(mini_test_version)
48
- include Mocha::MonkeyPatching::MiniTest::Version230To2101
48
+ include Mocha::Integration::MiniTest::Version230To2101
49
49
  elsif Gem::Requirement.new('>= 2.11.0', '<= 2.11.1').satisfied_by?(mini_test_version)
50
- include Mocha::MonkeyPatching::MiniTest::Version2110To2111
50
+ include Mocha::Integration::MiniTest::Version2110To2111
51
51
  elsif Gem::Requirement.new('>= 2.11.2', '<= 3.2.0').satisfied_by?(mini_test_version)
52
- include Mocha::MonkeyPatching::MiniTest::Version2112To320
52
+ include Mocha::Integration::MiniTest::Version2112To320
53
53
  elsif Gem::Requirement.new('3.3.0').satisfied_by?(mini_test_version)
54
- include Mocha::MonkeyPatching::MiniTest::Version330
54
+ include Mocha::Integration::MiniTest::Version330
55
55
  else
56
56
  $stderr.puts "*** No Mocha monkey-patch for MiniTest version ***" if $mocha_options['debug']
57
57
  end
@@ -1,6 +1,6 @@
1
1
  module Mocha
2
2
 
3
- module MonkeyPatching
3
+ module Integration
4
4
 
5
5
  module MiniTest
6
6
 
@@ -2,7 +2,7 @@ require 'mocha/expectation_error'
2
2
 
3
3
  module Mocha
4
4
 
5
- module MonkeyPatching
5
+ module Integration
6
6
 
7
7
  module MiniTest
8
8
 
@@ -1,8 +1,8 @@
1
- require 'mocha/monkey_patching/mini_test/assertion_counter'
1
+ require 'mocha/integration/mini_test/assertion_counter'
2
2
 
3
3
  module Mocha
4
4
 
5
- module MonkeyPatching
5
+ module Integration
6
6
 
7
7
  module MiniTest
8
8
 
@@ -22,12 +22,12 @@ module Mocha
22
22
  @passed = true
23
23
  rescue Exception => e
24
24
  @passed = false
25
- result = runner.puke(self.class, self.name, Mocha::MonkeyPatching::MiniTest.translate(e))
25
+ result = runner.puke(self.class, self.name, Mocha::Integration::MiniTest.translate(e))
26
26
  ensure
27
27
  begin
28
28
  self.teardown
29
29
  rescue Exception => e
30
- result = runner.puke(self.class, self.name, Mocha::MonkeyPatching::MiniTest.translate(e))
30
+ result = runner.puke(self.class, self.name, Mocha::Integration::MiniTest.translate(e))
31
31
  end
32
32
  end
33
33
  ensure
@@ -1,9 +1,9 @@
1
- require 'mocha/monkey_patching/mini_test/assertion_counter'
1
+ require 'mocha/integration/mini_test/assertion_counter'
2
2
  require 'mocha/expectation_error'
3
3
 
4
4
  module Mocha
5
5
 
6
- module MonkeyPatching
6
+ module Integration
7
7
 
8
8
  module MiniTest
9
9
 
@@ -23,12 +23,12 @@ module Mocha
23
23
  @passed = true
24
24
  rescue Exception => e
25
25
  @passed = false
26
- result = runner.puke(self.class, self.__name__, Mocha::MonkeyPatching::MiniTest.translate(e))
26
+ result = runner.puke(self.class, self.__name__, Mocha::Integration::MiniTest.translate(e))
27
27
  ensure
28
28
  begin
29
29
  self.teardown
30
30
  rescue Exception => e
31
- result = runner.puke(self.class, self.__name__, Mocha::MonkeyPatching::MiniTest.translate(e))
31
+ result = runner.puke(self.class, self.__name__, Mocha::Integration::MiniTest.translate(e))
32
32
  end
33
33
  end
34
34
  ensure
@@ -1,9 +1,9 @@
1
- require 'mocha/monkey_patching/mini_test/assertion_counter'
1
+ require 'mocha/integration/mini_test/assertion_counter'
2
2
  require 'mocha/expectation_error'
3
3
 
4
4
  module Mocha
5
5
 
6
- module MonkeyPatching
6
+ module Integration
7
7
 
8
8
  module MiniTest
9
9
 
@@ -31,14 +31,14 @@ module Mocha
31
31
  raise
32
32
  rescue Exception => e
33
33
  @passed = false
34
- result = runner.puke(self.class, self.__name__, Mocha::MonkeyPatching::MiniTest.translate(e))
34
+ result = runner.puke(self.class, self.__name__, Mocha::Integration::MiniTest.translate(e))
35
35
  ensure
36
36
  begin
37
37
  self.teardown
38
38
  rescue *::MiniTest::Unit::TestCase::PASSTHROUGH_EXCEPTIONS
39
39
  raise
40
40
  rescue Exception => e
41
- result = runner.puke(self.class, self.__name__, Mocha::MonkeyPatching::MiniTest.translate(e))
41
+ result = runner.puke(self.class, self.__name__, Mocha::Integration::MiniTest.translate(e))
42
42
  end
43
43
  trap 'INFO', 'DEFAULT'
44
44
  end
@@ -1,9 +1,9 @@
1
- require 'mocha/monkey_patching/mini_test/assertion_counter'
1
+ require 'mocha/integration/mini_test/assertion_counter'
2
2
  require 'mocha/expectation_error'
3
3
 
4
4
  module Mocha
5
5
 
6
- module MonkeyPatching
6
+ module Integration
7
7
 
8
8
  module MiniTest
9
9
 
@@ -31,14 +31,14 @@ module Mocha
31
31
  raise
32
32
  rescue Exception => e
33
33
  @passed = false
34
- result = runner.puke(self.class, self.__name__, Mocha::MonkeyPatching::MiniTest.translate(e))
34
+ result = runner.puke(self.class, self.__name__, Mocha::Integration::MiniTest.translate(e))
35
35
  ensure
36
36
  begin
37
37
  self.teardown
38
38
  rescue *::MiniTest::Unit::TestCase::PASSTHROUGH_EXCEPTIONS
39
39
  raise
40
40
  rescue Exception => e
41
- result = runner.puke(self.class, self.__name__, Mocha::MonkeyPatching::MiniTest.translate(e))
41
+ result = runner.puke(self.class, self.__name__, Mocha::Integration::MiniTest.translate(e))
42
42
  end
43
43
  trap 'INFO', 'DEFAULT' if ::MiniTest::Unit::TestCase::SUPPORTS_INFO_SIGNAL
44
44
  end
@@ -1,9 +1,9 @@
1
- require 'mocha/monkey_patching/mini_test/assertion_counter'
1
+ require 'mocha/integration/mini_test/assertion_counter'
2
2
  require 'mocha/expectation_error'
3
3
 
4
4
  module Mocha
5
5
 
6
- module MonkeyPatching
6
+ module Integration
7
7
 
8
8
  module MiniTest
9
9
 
@@ -32,14 +32,14 @@ module Mocha
32
32
  raise
33
33
  rescue Exception => e
34
34
  @passed = false
35
- result = runner.puke self.class, self.__name__, Mocha::MonkeyPatching::MiniTest.translate(e)
35
+ result = runner.puke self.class, self.__name__, Mocha::Integration::MiniTest.translate(e)
36
36
  ensure
37
37
  begin
38
38
  self.teardown
39
39
  rescue *::MiniTest::Unit::TestCase::PASSTHROUGH_EXCEPTIONS
40
40
  raise
41
41
  rescue Exception => e
42
- result = runner.puke self.class, self.__name__, Mocha::MonkeyPatching::MiniTest.translate(e)
42
+ result = runner.puke self.class, self.__name__, Mocha::Integration::MiniTest.translate(e)
43
43
  end
44
44
  trap 'INFO', 'DEFAULT' if ::MiniTest::Unit::TestCase::SUPPORTS_INFO_SIGNAL
45
45
  end
@@ -1,9 +1,9 @@
1
- require 'mocha/monkey_patching/mini_test/assertion_counter'
1
+ require 'mocha/integration/mini_test/assertion_counter'
2
2
  require 'mocha/expectation_error'
3
3
 
4
4
  module Mocha
5
5
 
6
- module MonkeyPatching
6
+ module Integration
7
7
 
8
8
  module MiniTest
9
9
 
@@ -32,14 +32,14 @@ module Mocha
32
32
  raise
33
33
  rescue Exception => e
34
34
  @passed = false
35
- result = runner.puke self.class, self.__name__, Mocha::MonkeyPatching::MiniTest.translate(e)
35
+ result = runner.puke self.class, self.__name__, Mocha::Integration::MiniTest.translate(e)
36
36
  ensure
37
37
  begin
38
38
  self.teardown
39
39
  rescue *::MiniTest::Unit::TestCase::PASSTHROUGH_EXCEPTIONS
40
40
  raise
41
41
  rescue Exception => e
42
- result = runner.puke self.class, self.__name__, Mocha::MonkeyPatching::MiniTest.translate(e)
42
+ result = runner.puke self.class, self.__name__, Mocha::Integration::MiniTest.translate(e)
43
43
  end
44
44
  trap 'INFO', 'DEFAULT' if ::MiniTest::Unit::TestCase::SUPPORTS_INFO_SIGNAL
45
45
  end
@@ -1,9 +1,9 @@
1
- require 'mocha/monkey_patching/mini_test/assertion_counter'
1
+ require 'mocha/integration/mini_test/assertion_counter'
2
2
  require 'mocha/expectation_error'
3
3
 
4
4
  module Mocha
5
5
 
6
- module MonkeyPatching
6
+ module Integration
7
7
 
8
8
  module MiniTest
9
9
 
@@ -34,7 +34,7 @@ module Mocha
34
34
  raise
35
35
  rescue Exception => e
36
36
  @passed = false
37
- result = runner.puke self.class, self.__name__, Mocha::MonkeyPatching::MiniTest.translate(e)
37
+ result = runner.puke self.class, self.__name__, Mocha::Integration::MiniTest.translate(e)
38
38
  ensure
39
39
  %w{ before_teardown teardown after_teardown }.each do |hook|
40
40
  begin
@@ -42,7 +42,7 @@ module Mocha
42
42
  rescue *::MiniTest::Unit::TestCase::PASSTHROUGH_EXCEPTIONS
43
43
  raise
44
44
  rescue Exception => e
45
- result = runner.puke self.class, self.__name__, Mocha::MonkeyPatching::MiniTest.translate(e)
45
+ result = runner.puke self.class, self.__name__, Mocha::Integration::MiniTest.translate(e)
46
46
  end
47
47
  end
48
48
  trap 'INFO', 'DEFAULT' if ::MiniTest::Unit::TestCase::SUPPORTS_INFO_SIGNAL
@@ -1,9 +1,9 @@
1
- require 'mocha/monkey_patching/mini_test/assertion_counter'
1
+ require 'mocha/integration/mini_test/assertion_counter'
2
2
  require 'mocha/expectation_error'
3
3
 
4
4
  module Mocha
5
5
 
6
- module MonkeyPatching
6
+ module Integration
7
7
 
8
8
  module MiniTest
9
9
 
@@ -37,7 +37,7 @@ module Mocha
37
37
  raise
38
38
  rescue Exception => e
39
39
  @passed = false
40
- result = runner.puke self.class, self.__name__, Mocha::MonkeyPatching::MiniTest.translate(e)
40
+ result = runner.puke self.class, self.__name__, Mocha::Integration::MiniTest.translate(e)
41
41
  ensure
42
42
  %w{ before_teardown teardown after_teardown }.each do |hook|
43
43
  begin
@@ -45,7 +45,7 @@ module Mocha
45
45
  rescue *::MiniTest::Unit::TestCase::PASSTHROUGH_EXCEPTIONS
46
46
  raise
47
47
  rescue Exception => e
48
- result = runner.puke self.class, self.__name__, Mocha::MonkeyPatching::MiniTest.translate(e)
48
+ result = runner.puke self.class, self.__name__, Mocha::Integration::MiniTest.translate(e)
49
49
  end
50
50
  end
51
51
  trap 'INFO', 'DEFAULT' if ::MiniTest::Unit::TestCase::SUPPORTS_INFO_SIGNAL
@@ -1,9 +1,9 @@
1
- require 'mocha/monkey_patching/mini_test/assertion_counter'
1
+ require 'mocha/integration/mini_test/assertion_counter'
2
2
  require 'mocha/expectation_error'
3
3
 
4
4
  module Mocha
5
5
 
6
- module MonkeyPatching
6
+ module Integration
7
7
 
8
8
  module MiniTest
9
9
 
@@ -33,7 +33,7 @@ module Mocha
33
33
  raise
34
34
  rescue Exception => e
35
35
  @passed = false
36
- result = runner.puke self.class, self.__name__, Mocha::MonkeyPatching::MiniTest.translate(e)
36
+ result = runner.puke self.class, self.__name__, Mocha::Integration::MiniTest.translate(e)
37
37
  ensure
38
38
  begin
39
39
  self.run_teardown_hooks
@@ -41,7 +41,7 @@ module Mocha
41
41
  rescue *::MiniTest::Unit::TestCase::PASSTHROUGH_EXCEPTIONS
42
42
  raise
43
43
  rescue Exception => e
44
- result = runner.puke self.class, self.__name__, Mocha::MonkeyPatching::MiniTest.translate(e)
44
+ result = runner.puke self.class, self.__name__, Mocha::Integration::MiniTest.translate(e)
45
45
  end
46
46
  trap 'INFO', 'DEFAULT' if ::MiniTest::Unit::TestCase::SUPPORTS_INFO_SIGNAL
47
47
  end
@@ -1,9 +1,9 @@
1
- require 'mocha/monkey_patching/mini_test/assertion_counter'
1
+ require 'mocha/integration/mini_test/assertion_counter'
2
2
  require 'mocha/expectation_error'
3
3
 
4
4
  module Mocha
5
5
 
6
- module MonkeyPatching
6
+ module Integration
7
7
 
8
8
  module MiniTest
9
9
 
@@ -37,7 +37,7 @@ module Mocha
37
37
  raise
38
38
  rescue Exception => e
39
39
  @passed = false
40
- result = runner.puke self.class, self.__name__, Mocha::MonkeyPatching::MiniTest.translate(e)
40
+ result = runner.puke self.class, self.__name__, Mocha::Integration::MiniTest.translate(e)
41
41
  ensure
42
42
  %w{ before_teardown teardown after_teardown }.each do |hook|
43
43
  begin
@@ -46,7 +46,7 @@ module Mocha
46
46
  raise
47
47
  rescue Exception => e
48
48
  @passed = false
49
- result = runner.puke self.class, self.__name__, Mocha::MonkeyPatching::MiniTest.translate(e)
49
+ result = runner.puke self.class, self.__name__, Mocha::Integration::MiniTest.translate(e)
50
50
  end
51
51
  end
52
52
  trap 'INFO', 'DEFAULT' if ::MiniTest::Unit::TestCase::SUPPORTS_INFO_SIGNAL
@@ -3,12 +3,12 @@ require 'mocha/options'
3
3
 
4
4
  if !Test::Unit::TestCase.ancestors.include?(Mocha::API)
5
5
 
6
- require 'mocha/monkey_patching/test_unit/gem_version_200'
7
- require 'mocha/monkey_patching/test_unit/gem_version_201_to_202'
8
- require 'mocha/monkey_patching/test_unit/gem_version_203_to_220'
9
- require 'mocha/monkey_patching/test_unit/gem_version_230_to_251'
10
- require 'mocha/monkey_patching/test_unit/ruby_version_185_and_below'
11
- require 'mocha/monkey_patching/test_unit/ruby_version_186_and_above'
6
+ require 'mocha/integration/test_unit/gem_version_200'
7
+ require 'mocha/integration/test_unit/gem_version_201_to_202'
8
+ require 'mocha/integration/test_unit/gem_version_203_to_220'
9
+ require 'mocha/integration/test_unit/gem_version_230_to_251'
10
+ require 'mocha/integration/test_unit/ruby_version_185_and_below'
11
+ require 'mocha/integration/test_unit/ruby_version_186_and_above'
12
12
 
13
13
  module Test
14
14
  module Unit
@@ -33,18 +33,18 @@ if !Test::Unit::TestCase.ancestors.include?(Mocha::API)
33
33
 
34
34
  if (test_unit_version == Gem::Version.new('1.x')) || (test_unit_version == Gem::Version.new('1.2.3'))
35
35
  if RUBY_VERSION < '1.8.6'
36
- include Mocha::MonkeyPatching::TestUnit::RubyVersion185AndBelow
36
+ include Mocha::Integration::TestUnit::RubyVersion185AndBelow
37
37
  else
38
- include Mocha::MonkeyPatching::TestUnit::RubyVersion186AndAbove
38
+ include Mocha::Integration::TestUnit::RubyVersion186AndAbove
39
39
  end
40
40
  elsif Gem::Requirement.new('2.0.0').satisfied_by?(test_unit_version)
41
- include Mocha::MonkeyPatching::TestUnit::GemVersion200
41
+ include Mocha::Integration::TestUnit::GemVersion200
42
42
  elsif Gem::Requirement.new('>= 2.0.1', '<= 2.0.2').satisfied_by?(test_unit_version)
43
- include Mocha::MonkeyPatching::TestUnit::GemVersion201To202
43
+ include Mocha::Integration::TestUnit::GemVersion201To202
44
44
  elsif Gem::Requirement.new('>= 2.0.3', '<= 2.2.0').satisfied_by?(test_unit_version)
45
- include Mocha::MonkeyPatching::TestUnit::GemVersion203To220
45
+ include Mocha::Integration::TestUnit::GemVersion203To220
46
46
  elsif Gem::Requirement.new('>= 2.3.0', '<= 2.5.1').satisfied_by?(test_unit_version)
47
- include Mocha::MonkeyPatching::TestUnit::GemVersion230To251
47
+ include Mocha::Integration::TestUnit::GemVersion230To251
48
48
  else
49
49
  $stderr.puts "*** No Mocha monkey-patch for Test::Unit version ***" if $mocha_options['debug']
50
50
  end
@@ -1,6 +1,6 @@
1
1
  module Mocha
2
2
 
3
- module MonkeyPatching
3
+ module Integration
4
4
 
5
5
  module TestUnit
6
6
 
@@ -1,10 +1,10 @@
1
1
  require 'test/unit/testcase'
2
- require 'mocha/monkey_patching/test_unit/assertion_counter'
2
+ require 'mocha/integration/test_unit/assertion_counter'
3
3
  require 'mocha/expectation_error'
4
4
 
5
5
  module Mocha
6
6
 
7
- module MonkeyPatching
7
+ module Integration
8
8
 
9
9
  module TestUnit
10
10
 
@@ -1,10 +1,10 @@
1
1
  require 'test/unit/testcase'
2
- require 'mocha/monkey_patching/test_unit/assertion_counter'
2
+ require 'mocha/integration/test_unit/assertion_counter'
3
3
  require 'mocha/expectation_error'
4
4
 
5
5
  module Mocha
6
6
 
7
- module MonkeyPatching
7
+ module Integration
8
8
 
9
9
  module TestUnit
10
10
 
@@ -1,10 +1,10 @@
1
1
  require 'test/unit/testcase'
2
- require 'mocha/monkey_patching/test_unit/assertion_counter'
2
+ require 'mocha/integration/test_unit/assertion_counter'
3
3
  require 'mocha/expectation_error'
4
4
 
5
5
  module Mocha
6
6
 
7
- module MonkeyPatching
7
+ module Integration
8
8
 
9
9
  module TestUnit
10
10
 
@@ -1,10 +1,10 @@
1
1
  require 'test/unit/testcase'
2
- require 'mocha/monkey_patching/test_unit/assertion_counter'
2
+ require 'mocha/integration/test_unit/assertion_counter'
3
3
  require 'mocha/expectation_error'
4
4
 
5
5
  module Mocha
6
6
 
7
- module MonkeyPatching
7
+ module Integration
8
8
 
9
9
  module TestUnit
10
10
 
@@ -1,10 +1,10 @@
1
1
  require 'test/unit/testcase'
2
- require 'mocha/monkey_patching/test_unit/assertion_counter'
2
+ require 'mocha/integration/test_unit/assertion_counter'
3
3
  require 'mocha/expectation_error'
4
4
 
5
5
  module Mocha
6
6
 
7
- module MonkeyPatching
7
+ module Integration
8
8
 
9
9
  module TestUnit
10
10
 
@@ -1,10 +1,10 @@
1
1
  require 'test/unit/testcase'
2
- require 'mocha/monkey_patching/test_unit/assertion_counter'
2
+ require 'mocha/integration/test_unit/assertion_counter'
3
3
  require 'mocha/expectation_error'
4
4
 
5
5
  module Mocha
6
6
 
7
- module MonkeyPatching
7
+ module Integration
8
8
 
9
9
  module TestUnit
10
10
 
@@ -1,3 +1,3 @@
1
1
  module Mocha
2
- VERSION = "0.12.2"
2
+ VERSION = "0.12.3"
3
3
  end
@@ -19,7 +19,7 @@ else
19
19
  if defined?(MiniTest)
20
20
 
21
21
  # monkey-patch MiniTest now that it has hopefully been loaded
22
- require 'mocha/monkey_patching/mini_test'
22
+ require 'mocha/integration/mini_test'
23
23
 
24
24
  class MiniTestSampleTest < MiniTest::Unit::TestCase
25
25
 
@@ -1,7 +1,7 @@
1
1
  require 'test/unit/testcase'
2
2
 
3
3
  if defined?(MiniTest)
4
- require 'mocha/monkey_patching/mini_test'
4
+ require 'mocha/integration/mini_test'
5
5
  require File.expand_path('../mini_test_result', __FILE__)
6
6
  else
7
7
  require File.expand_path('../test_unit_result', __FILE__)
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: mocha
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.12.2
4
+ version: 0.12.3
5
5
  prerelease:
6
6
  platform: ruby
7
7
  authors:
@@ -9,11 +9,11 @@ authors:
9
9
  autorequire:
10
10
  bindir: bin
11
11
  cert_chain: []
12
- date: 2012-08-02 00:00:00.000000000 Z
12
+ date: 2012-08-06 00:00:00.000000000 Z
13
13
  dependencies:
14
14
  - !ruby/object:Gem::Dependency
15
15
  name: metaclass
16
- requirement: &70321302911880 !ruby/object:Gem::Requirement
16
+ requirement: &70332590701460 !ruby/object:Gem::Requirement
17
17
  none: false
18
18
  requirements:
19
19
  - - ~>
@@ -21,10 +21,10 @@ dependencies:
21
21
  version: 0.0.1
22
22
  type: :runtime
23
23
  prerelease: false
24
- version_requirements: *70321302911880
24
+ version_requirements: *70332590701460
25
25
  - !ruby/object:Gem::Dependency
26
26
  name: rake
27
- requirement: &70321302910560 !ruby/object:Gem::Requirement
27
+ requirement: &70332590700140 !ruby/object:Gem::Requirement
28
28
  none: false
29
29
  requirements:
30
30
  - - ! '>='
@@ -32,10 +32,10 @@ dependencies:
32
32
  version: '0'
33
33
  type: :development
34
34
  prerelease: false
35
- version_requirements: *70321302910560
35
+ version_requirements: *70332590700140
36
36
  - !ruby/object:Gem::Dependency
37
37
  name: introspection
38
- requirement: &70321302910100 !ruby/object:Gem::Requirement
38
+ requirement: &70332590699680 !ruby/object:Gem::Requirement
39
39
  none: false
40
40
  requirements:
41
41
  - - ~>
@@ -43,10 +43,10 @@ dependencies:
43
43
  version: 0.0.1
44
44
  type: :development
45
45
  prerelease: false
46
- version_requirements: *70321302910100
46
+ version_requirements: *70332590699680
47
47
  - !ruby/object:Gem::Dependency
48
48
  name: yard
49
- requirement: &70321302909720 !ruby/object:Gem::Requirement
49
+ requirement: &70332590699300 !ruby/object:Gem::Requirement
50
50
  none: false
51
51
  requirements:
52
52
  - - ! '>='
@@ -54,7 +54,7 @@ dependencies:
54
54
  version: '0'
55
55
  type: :development
56
56
  prerelease: false
57
- version_requirements: *70321302909720
57
+ version_requirements: *70332590699300
58
58
  description: Mocking and stubbing library with JMock/SchMock syntax, which allows
59
59
  mocking and stubbing of methods on real (non-mock) classes.
60
60
  email: mocha-developer@googlegroups.com
@@ -109,34 +109,34 @@ files:
109
109
  - lib/mocha/in_state_ordering_constraint.rb
110
110
  - lib/mocha/inspect.rb
111
111
  - lib/mocha/instance_method.rb
112
+ - lib/mocha/integration.rb
113
+ - lib/mocha/integration/mini_test.rb
114
+ - lib/mocha/integration/mini_test/assertion_counter.rb
115
+ - lib/mocha/integration/mini_test/exception_translation.rb
116
+ - lib/mocha/integration/mini_test/version_13.rb
117
+ - lib/mocha/integration/mini_test/version_140.rb
118
+ - lib/mocha/integration/mini_test/version_141.rb
119
+ - lib/mocha/integration/mini_test/version_142_to_172.rb
120
+ - lib/mocha/integration/mini_test/version_200.rb
121
+ - lib/mocha/integration/mini_test/version_201_to_222.rb
122
+ - lib/mocha/integration/mini_test/version_2110_to_2111.rb
123
+ - lib/mocha/integration/mini_test/version_2112_to_320.rb
124
+ - lib/mocha/integration/mini_test/version_230_to_2101.rb
125
+ - lib/mocha/integration/mini_test/version_330.rb
126
+ - lib/mocha/integration/test_unit.rb
127
+ - lib/mocha/integration/test_unit/assertion_counter.rb
128
+ - lib/mocha/integration/test_unit/gem_version_200.rb
129
+ - lib/mocha/integration/test_unit/gem_version_201_to_202.rb
130
+ - lib/mocha/integration/test_unit/gem_version_203_to_220.rb
131
+ - lib/mocha/integration/test_unit/gem_version_230_to_251.rb
132
+ - lib/mocha/integration/test_unit/ruby_version_185_and_below.rb
133
+ - lib/mocha/integration/test_unit/ruby_version_186_and_above.rb
112
134
  - lib/mocha/is_a.rb
113
135
  - lib/mocha/logger.rb
114
136
  - lib/mocha/method_matcher.rb
115
137
  - lib/mocha/mock.rb
116
138
  - lib/mocha/mockery.rb
117
139
  - lib/mocha/module_method.rb
118
- - lib/mocha/monkey_patching.rb
119
- - lib/mocha/monkey_patching/mini_test.rb
120
- - lib/mocha/monkey_patching/mini_test/assertion_counter.rb
121
- - lib/mocha/monkey_patching/mini_test/exception_translation.rb
122
- - lib/mocha/monkey_patching/mini_test/version_13.rb
123
- - lib/mocha/monkey_patching/mini_test/version_140.rb
124
- - lib/mocha/monkey_patching/mini_test/version_141.rb
125
- - lib/mocha/monkey_patching/mini_test/version_142_to_172.rb
126
- - lib/mocha/monkey_patching/mini_test/version_200.rb
127
- - lib/mocha/monkey_patching/mini_test/version_201_to_222.rb
128
- - lib/mocha/monkey_patching/mini_test/version_2110_to_2111.rb
129
- - lib/mocha/monkey_patching/mini_test/version_2112_to_320.rb
130
- - lib/mocha/monkey_patching/mini_test/version_230_to_2101.rb
131
- - lib/mocha/monkey_patching/mini_test/version_330.rb
132
- - lib/mocha/monkey_patching/test_unit.rb
133
- - lib/mocha/monkey_patching/test_unit/assertion_counter.rb
134
- - lib/mocha/monkey_patching/test_unit/gem_version_200.rb
135
- - lib/mocha/monkey_patching/test_unit/gem_version_201_to_202.rb
136
- - lib/mocha/monkey_patching/test_unit/gem_version_203_to_220.rb
137
- - lib/mocha/monkey_patching/test_unit/gem_version_230_to_251.rb
138
- - lib/mocha/monkey_patching/test_unit/ruby_version_185_and_below.rb
139
- - lib/mocha/monkey_patching/test_unit/ruby_version_186_and_above.rb
140
140
  - lib/mocha/multiple_yields.rb
141
141
  - lib/mocha/names.rb
142
142
  - lib/mocha/no_yields.rb
@@ -311,7 +311,7 @@ required_ruby_version: !ruby/object:Gem::Requirement
311
311
  version: '0'
312
312
  segments:
313
313
  - 0
314
- hash: 378206207515710598
314
+ hash: 1181077861632891225
315
315
  required_rubygems_version: !ruby/object:Gem::Requirement
316
316
  none: false
317
317
  requirements: