mocha 0.9.12 → 0.10.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (60) hide show
  1. data/Gemfile +3 -0
  2. data/Gemfile.minitest.1.3.0 +7 -0
  3. data/Gemfile.minitest.1.4.0 +7 -0
  4. data/Gemfile.minitest.1.4.1 +7 -0
  5. data/Gemfile.minitest.1.4.2 +7 -0
  6. data/Gemfile.minitest.2.0.0 +7 -0
  7. data/Gemfile.minitest.2.0.1 +7 -0
  8. data/Gemfile.minitest.2.3.0 +7 -0
  9. data/Gemfile.minitest.latest +7 -0
  10. data/Gemfile.test-unit.2.0.0 +8 -0
  11. data/Gemfile.test-unit.2.0.1 +7 -0
  12. data/Gemfile.test-unit.2.0.3 +7 -0
  13. data/Gemfile.test-unit.latest +7 -0
  14. data/README.rdoc +4 -0
  15. data/RELEASE.rdoc +22 -3
  16. data/Rakefile +17 -90
  17. data/init.rb +3 -0
  18. data/lib/mocha.rb +1 -1
  19. data/lib/mocha/central.rb +4 -4
  20. data/lib/mocha/class_method.rb +20 -20
  21. data/lib/mocha/expectation.rb +33 -6
  22. data/lib/mocha/instance_method.rb +17 -1
  23. data/lib/mocha/integration/mini_test.rb +17 -13
  24. data/lib/mocha/integration/mini_test/{version_201_to_202.rb → version_201_to_222.rb} +9 -9
  25. data/lib/mocha/integration/mini_test/version_230_to_251.rb +59 -0
  26. data/lib/mocha/integration/test_unit.rb +17 -13
  27. data/lib/mocha/integration/test_unit/{gem_version_203_to_209.rb → gem_version_203_to_220.rb} +8 -8
  28. data/lib/mocha/integration/test_unit/gem_version_230_to_233.rb +58 -0
  29. data/lib/mocha/mock.rb +14 -14
  30. data/lib/mocha/object.rb +1 -1
  31. data/lib/mocha/thrower.rb +15 -0
  32. data/lib/mocha/version.rb +3 -0
  33. data/mocha.gemspec +43 -0
  34. data/test/acceptance/acceptance_test_helper.rb +3 -0
  35. data/test/acceptance/expectations_on_multiple_methods_test.rb +55 -0
  36. data/test/acceptance/minitest_test.rb +12 -7
  37. data/test/acceptance/raise_exception_test.rb +39 -0
  38. data/test/acceptance/{stub_class_method_test.rb → stub_class_method_defined_on_active_record_association_proxy_test.rb} +3 -103
  39. data/test/acceptance/stub_class_method_defined_on_class_test.rb +72 -0
  40. data/test/acceptance/stub_class_method_defined_on_module_test.rb +75 -0
  41. data/test/acceptance/stub_class_method_defined_on_superclass_test.rb +75 -0
  42. data/test/acceptance/stub_instance_method_defined_on_active_record_association_proxy_test.rb +93 -0
  43. data/test/acceptance/stub_instance_method_defined_on_class_and_aliased_test.rb +69 -0
  44. data/test/acceptance/stub_instance_method_defined_on_class_test.rb +66 -0
  45. data/test/acceptance/stub_instance_method_defined_on_kernel_module_test.rb +75 -0
  46. data/test/acceptance/stub_instance_method_defined_on_module_test.rb +75 -0
  47. data/test/acceptance/stub_instance_method_defined_on_object_class_test.rb +75 -0
  48. data/test/acceptance/stub_instance_method_defined_on_singleton_class_test.rb +70 -0
  49. data/test/acceptance/stub_instance_method_defined_on_superclass_test.rb +72 -0
  50. data/test/acceptance/throw_test.rb +45 -0
  51. data/test/method_definer.rb +3 -3
  52. data/test/test_helper.rb +0 -6
  53. data/test/unit/central_test.rb +7 -3
  54. data/test/unit/class_method_test.rb +10 -10
  55. data/test/unit/mockery_test.rb +1 -0
  56. data/test/unit/thrower_test.rb +20 -0
  57. metadata +110 -33
  58. data/lib/mocha/metaclass.rb +0 -13
  59. data/test/acceptance/stub_instance_method_test.rb +0 -206
  60. data/test/unit/metaclass_test.rb +0 -22
@@ -0,0 +1,75 @@
1
+ require File.expand_path('../acceptance_test_helper', __FILE__)
2
+ require 'mocha'
3
+
4
+ class StubInstanceMethodDefinedOnObjectClassTest < Test::Unit::TestCase
5
+
6
+ include AcceptanceTest
7
+
8
+ def setup
9
+ setup_acceptance_test
10
+ end
11
+
12
+ def teardown
13
+ teardown_acceptance_test
14
+ end
15
+
16
+ def test_should_stub_public_method_and_leave_it_unchanged_after_test
17
+ Object.class_eval do
18
+ def my_instance_method
19
+ :original_return_value
20
+ end
21
+ public :my_instance_method
22
+ end
23
+ instance = Class.new.new
24
+ assert_snapshot_unchanged(instance) do
25
+ test_result = run_as_test do
26
+ instance.stubs(:my_instance_method).returns(:new_return_value)
27
+ assert_equal :new_return_value, instance.my_instance_method
28
+ end
29
+ assert_passed(test_result)
30
+ end
31
+ assert_equal :original_return_value, instance.my_instance_method
32
+ ensure
33
+ Object.class_eval { remove_method :my_instance_method }
34
+ end
35
+
36
+ def test_should_stub_protected_method_and_leave_it_unchanged_after_test
37
+ Object.class_eval do
38
+ def my_instance_method
39
+ :original_return_value
40
+ end
41
+ protected :my_instance_method
42
+ end
43
+ instance = Class.new.new
44
+ assert_snapshot_unchanged(instance) do
45
+ test_result = run_as_test do
46
+ instance.stubs(:my_instance_method).returns(:new_return_value)
47
+ assert_equal :new_return_value, instance.send(:my_instance_method)
48
+ end
49
+ assert_passed(test_result)
50
+ end
51
+ assert_equal :original_return_value, instance.send(:my_instance_method)
52
+ ensure
53
+ Object.class_eval { remove_method :my_instance_method }
54
+ end
55
+
56
+ def test_should_stub_private_method_and_leave_it_unchanged_after_test
57
+ Object.class_eval do
58
+ def my_instance_method
59
+ :original_return_value
60
+ end
61
+ private :my_instance_method
62
+ end
63
+ instance = Class.new.new
64
+ assert_snapshot_unchanged(instance) do
65
+ test_result = run_as_test do
66
+ instance.stubs(:my_instance_method).returns(:new_return_value)
67
+ assert_equal :new_return_value, instance.send(:my_instance_method)
68
+ end
69
+ assert_passed(test_result)
70
+ end
71
+ assert_equal :original_return_value, instance.send(:my_instance_method)
72
+ ensure
73
+ Object.class_eval { remove_method :my_instance_method }
74
+ end
75
+ end
@@ -0,0 +1,70 @@
1
+ require File.expand_path('../acceptance_test_helper', __FILE__)
2
+ require 'mocha'
3
+
4
+ class StubInstanceMethodDefinedOnSingletonClassTest < Test::Unit::TestCase
5
+
6
+ include AcceptanceTest
7
+
8
+ def setup
9
+ setup_acceptance_test
10
+ end
11
+
12
+ def teardown
13
+ teardown_acceptance_test
14
+ end
15
+
16
+ def test_should_stub_public_method_and_leave_it_unchanged_after_test
17
+ instance = Class.new.new
18
+ class << instance
19
+ def my_singleton_method
20
+ :original_return_value
21
+ end
22
+ public :my_singleton_method
23
+ end
24
+ assert_snapshot_unchanged(instance) do
25
+ test_result = run_as_test do
26
+ instance.stubs(:my_singleton_method).returns(:stubbed_return_value)
27
+ assert_equal :stubbed_return_value, instance.my_singleton_method
28
+ end
29
+ assert_passed(test_result)
30
+ end
31
+ assert_equal :original_return_value, instance.my_singleton_method
32
+ end
33
+
34
+ def test_should_stub_protected_method_and_leave_it_unchanged_after_test
35
+ instance = Class.new.new
36
+ class << instance
37
+ def my_singleton_method
38
+ :original_return_value
39
+ end
40
+ protected :my_singleton_method
41
+ end
42
+ assert_snapshot_unchanged(instance) do
43
+ test_result = run_as_test do
44
+ instance.stubs(:my_singleton_method).returns(:stubbed_return_value)
45
+ assert_equal :stubbed_return_value, instance.send(:my_singleton_method)
46
+ end
47
+ assert_passed(test_result)
48
+ end
49
+ assert_equal :original_return_value, instance.send(:my_singleton_method)
50
+ end
51
+
52
+ def test_should_stub_private_method_and_leave_it_unchanged_after_test
53
+ instance = Class.new.new
54
+ class << instance
55
+ def my_singleton_method
56
+ :original_return_value
57
+ end
58
+ private :my_singleton_method
59
+ end
60
+ assert_snapshot_unchanged(instance) do
61
+ test_result = run_as_test do
62
+ instance.stubs(:my_singleton_method).returns(:stubbed_return_value)
63
+ assert_equal :stubbed_return_value, instance.send(:my_singleton_method)
64
+ end
65
+ assert_passed(test_result)
66
+ end
67
+ assert_equal :original_return_value, instance.send(:my_singleton_method)
68
+ end
69
+
70
+ end
@@ -0,0 +1,72 @@
1
+ require File.expand_path('../acceptance_test_helper', __FILE__)
2
+ require 'mocha'
3
+
4
+ class StubInstanceMethodDefinedOnSuperclassTest < Test::Unit::TestCase
5
+
6
+ include AcceptanceTest
7
+
8
+ def setup
9
+ setup_acceptance_test
10
+ end
11
+
12
+ def teardown
13
+ teardown_acceptance_test
14
+ end
15
+
16
+ def test_should_stub_public_method_and_leave_it_unchanged_after_test
17
+ superklass = Class.new do
18
+ def my_superclass_method
19
+ :original_return_value
20
+ end
21
+ public :my_superclass_method
22
+ end
23
+ klass = Class.new(superklass)
24
+ instance = klass.new
25
+ assert_snapshot_unchanged(instance) do
26
+ test_result = run_as_test do
27
+ instance.stubs(:my_superclass_method).returns(:new_return_value)
28
+ assert_equal :new_return_value, instance.my_superclass_method
29
+ end
30
+ assert_passed(test_result)
31
+ end
32
+ assert_equal :original_return_value, instance.my_superclass_method
33
+ end
34
+
35
+ def test_should_stub_protected_method_and_leave_it_unchanged_after_test
36
+ superklass = Class.new do
37
+ def my_superclass_method
38
+ :original_return_value
39
+ end
40
+ protected :my_superclass_method
41
+ end
42
+ klass = Class.new(superklass)
43
+ instance = klass.new
44
+ assert_snapshot_unchanged(instance) do
45
+ test_result = run_as_test do
46
+ instance.stubs(:my_superclass_method).returns(:new_return_value)
47
+ assert_equal :new_return_value, instance.send(:my_superclass_method)
48
+ end
49
+ assert_passed(test_result)
50
+ end
51
+ assert_equal :original_return_value, instance.send(:my_superclass_method)
52
+ end
53
+
54
+ def test_should_stub_private_method_and_leave_it_unchanged_after_test
55
+ superklass = Class.new do
56
+ def my_superclass_method
57
+ :original_return_value
58
+ end
59
+ private :my_superclass_method
60
+ end
61
+ klass = Class.new(superklass)
62
+ instance = klass.new
63
+ assert_snapshot_unchanged(instance) do
64
+ test_result = run_as_test do
65
+ instance.stubs(:my_superclass_method).returns(:new_return_value)
66
+ assert_equal :new_return_value, instance.send(:my_superclass_method)
67
+ end
68
+ assert_passed(test_result)
69
+ end
70
+ assert_equal :original_return_value, instance.send(:my_superclass_method)
71
+ end
72
+ end
@@ -0,0 +1,45 @@
1
+ require File.expand_path('../acceptance_test_helper', __FILE__)
2
+ require 'mocha'
3
+
4
+ class ThrowTest < Test::Unit::TestCase
5
+
6
+ include AcceptanceTest
7
+
8
+ def setup
9
+ setup_acceptance_test
10
+ end
11
+
12
+ def teardown
13
+ teardown_acceptance_test
14
+ end
15
+
16
+ def test_should_throw_tag
17
+ test_result = run_as_test do
18
+ foo = stub('foo')
19
+ foo.stubs(:bar).throws(:tag)
20
+ assert_throws(:tag) { foo.bar }
21
+ end
22
+ assert_passed(test_result)
23
+ end
24
+
25
+ def test_should_throw_with_return_value
26
+ test_result = run_as_test do
27
+ foo = stub('foo')
28
+ foo.stubs(:bar).throws(:tag, 'return-value')
29
+ return_value = catch(:tag) { foo.bar }
30
+ assert_equal 'return-value', return_value
31
+ end
32
+ assert_passed(test_result)
33
+ end
34
+
35
+ def test_should_throw_two_different_tags
36
+ test_result = run_as_test do
37
+ foo = stub('foo')
38
+ foo.stubs(:bar).throws(:tag_one).then.throws(:tag_two)
39
+ assert_throws(:tag_one) { foo.bar }
40
+ assert_throws(:tag_two) { foo.bar }
41
+ end
42
+ assert_passed(test_result)
43
+ end
44
+
45
+ end
@@ -1,7 +1,7 @@
1
- require 'mocha/metaclass'
1
+ require 'metaclass'
2
2
 
3
3
  module Mocha
4
-
4
+
5
5
  module ObjectMethods
6
6
  def define_instance_method(method_symbol, &block)
7
7
  __metaclass__.send(:define_method, method_symbol, block)
@@ -16,7 +16,7 @@ module Mocha
16
16
  symbols.each { |symbol| __metaclass__.send(:attr_accessor, symbol) }
17
17
  end
18
18
  end
19
-
19
+
20
20
  end
21
21
 
22
22
  class Object
@@ -8,10 +8,4 @@ $:.unshift File.expand_path(File.join(File.dirname(__FILE__), 'unit'))
8
8
  $:.unshift File.expand_path(File.join(File.dirname(__FILE__), 'unit', 'parameter_matchers'))
9
9
  $:.unshift File.expand_path(File.join(File.dirname(__FILE__), 'acceptance'))
10
10
 
11
- require 'mocha/options'
12
- if $options['use_test_unit_gem']
13
- require 'rubygems'
14
- gem 'test-unit'
15
- end
16
-
17
11
  require 'test/unit'
@@ -26,11 +26,10 @@ class CentralTest < Test::Unit::TestCase
26
26
 
27
27
  def test_should_not_stub_method_if_already_stubbed
28
28
  method = Mock.new
29
+ method.stubs(:matches?).returns(true)
29
30
  method.expects(:stub).times(0)
30
31
  stubba = Central.new
31
- stubba_methods = Mock.new
32
- stubba_methods.stubs(:include?).with(method).returns(true)
33
- stubba.stubba_methods = stubba_methods
32
+ stubba.stubba_methods = [method]
34
33
 
35
34
  stubba.stub(method)
36
35
 
@@ -50,7 +49,9 @@ class CentralTest < Test::Unit::TestCase
50
49
  def test_should_unstub_specified_method
51
50
  stubba = Central.new
52
51
  method_1 = Mock.new
52
+ method_1.stubs(:matches?).returns(false)
53
53
  method_2 = Mock.new
54
+ method_2.stubs(:matches?).returns(true)
54
55
  method_2.expects(:unstub)
55
56
  stubba.stubba_methods = [method_1, method_2]
56
57
 
@@ -63,6 +64,7 @@ class CentralTest < Test::Unit::TestCase
63
64
  def test_should_not_unstub_specified_method_if_not_already_stubbed
64
65
  stubba = Central.new
65
66
  method_1 = Mock.new
67
+ method_1.stubs(:matches?).returns(false)
66
68
  method_2 = Mock.new
67
69
  method_2.expects(:unstub).never
68
70
  stubba.stubba_methods = [method_1]
@@ -76,8 +78,10 @@ class CentralTest < Test::Unit::TestCase
76
78
  def test_should_unstub_all_methods
77
79
  stubba = Central.new
78
80
  method_1 = Mock.new
81
+ method_1.stubs(:matches?).returns(true)
79
82
  method_1.expects(:unstub)
80
83
  method_2 = Mock.new
84
+ method_2.stubs(:matches?).returns(true)
81
85
  method_2.expects(:unstub)
82
86
  stubba.stubba_methods = [method_1, method_2]
83
87
 
@@ -197,41 +197,41 @@ class ClassMethodTest < Test::Unit::TestCase
197
197
  assert_equal stubbee.mocha, method.mock
198
198
  end
199
199
 
200
- def test_should_not_be_equal_if_other_object_has_a_different_class
200
+ def test_should_not_match_if_other_object_has_a_different_class
201
201
  class_method = ClassMethod.new(Object.new, :method)
202
202
  other_object = Object.new
203
- assert class_method != other_object
203
+ assert !class_method.matches?(other_object)
204
204
  end
205
205
 
206
- def test_should_not_be_equal_if_other_class_method_has_different_stubbee
206
+ def test_should_not_match_if_other_class_method_has_different_stubbee
207
207
  stubbee_1 = Object.new
208
208
  stubbee_2 = Object.new
209
209
  class_method_1 = ClassMethod.new(stubbee_1, :method)
210
210
  class_method_2 = ClassMethod.new(stubbee_2, :method)
211
- assert class_method_1 != class_method_2
211
+ assert !class_method_1.matches?(class_method_2)
212
212
  end
213
213
 
214
- def test_should_not_be_equal_if_other_class_method_has_different_method
214
+ def test_should_not_match_if_other_class_method_has_different_method
215
215
  stubbee = Object.new
216
216
  class_method_1 = ClassMethod.new(stubbee, :method_1)
217
217
  class_method_2 = ClassMethod.new(stubbee, :method_2)
218
- assert class_method_1 != class_method_2
218
+ assert !class_method_1.matches?(class_method_2)
219
219
  end
220
220
 
221
- def test_should_be_equal_if_other_class_method_has_same_stubbee_and_same_method_so_no_attempt_is_made_to_stub_a_method_twice
221
+ def test_should_match_if_other_class_method_has_same_stubbee_and_same_method_so_no_attempt_is_made_to_stub_a_method_twice
222
222
  stubbee = Object.new
223
223
  class_method_1 = ClassMethod.new(stubbee, :method)
224
224
  class_method_2 = ClassMethod.new(stubbee, :method)
225
- assert class_method_1 == class_method_2
225
+ assert class_method_1.matches?(class_method_2)
226
226
  end
227
227
 
228
- def test_should_be_equal_if_other_class_method_has_same_stubbee_and_same_method_but_stubbee_equal_method_lies_like_active_record_association_proxy
228
+ def test_should_match_if_other_class_method_has_same_stubbee_and_same_method_but_stubbee_equal_method_lies_like_active_record_association_proxy
229
229
  stubbee = Class.new do
230
230
  def equal?(other); false; end
231
231
  end.new
232
232
  class_method_1 = ClassMethod.new(stubbee, :method)
233
233
  class_method_2 = ClassMethod.new(stubbee, :method)
234
- assert class_method_1 == class_method_2
234
+ assert class_method_1.matches?(class_method_2)
235
235
  end
236
236
 
237
237
  end
@@ -72,6 +72,7 @@ class MockeryTest < Test::Unit::TestCase
72
72
  class FakeMethod
73
73
  def stub; end
74
74
  def unstub; end
75
+ def matches?(other); true; end
75
76
  end
76
77
 
77
78
  def test_should_unstub_all_methods_on_teardown
@@ -0,0 +1,20 @@
1
+ require File.expand_path('../../test_helper', __FILE__)
2
+
3
+ require 'mocha/thrower'
4
+
5
+ class ThrowerTest < Test::Unit::TestCase
6
+
7
+ include Mocha
8
+
9
+ def test_should_throw_tag
10
+ thrower = Thrower.new(:tag)
11
+ assert_throws(:tag) { thrower.evaluate }
12
+ end
13
+
14
+ def test_should_throw_tag_with_return_value
15
+ thrower = Thrower.new(:tag, 'return-value')
16
+ return_value = catch(:tag) { thrower.evaluate }
17
+ assert_equal 'return-value', return_value
18
+ end
19
+
20
+ end
metadata CHANGED
@@ -1,13 +1,13 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: mocha
3
3
  version: !ruby/object:Gem::Version
4
- hash: 35
5
- prerelease: false
4
+ hash: 55
5
+ prerelease:
6
6
  segments:
7
7
  - 0
8
- - 9
9
- - 12
10
- version: 0.9.12
8
+ - 10
9
+ - 0
10
+ version: 0.10.0
11
11
  platform: ruby
12
12
  authors:
13
13
  - James Mead
@@ -15,13 +15,26 @@ autorequire:
15
15
  bindir: bin
16
16
  cert_chain: []
17
17
 
18
- date: 2011-02-13 00:00:00 +00:00
19
- default_executable:
18
+ date: 2011-09-05 00:00:00 Z
20
19
  dependencies:
21
20
  - !ruby/object:Gem::Dependency
22
- name: rake
21
+ version_requirements: &id001 !ruby/object:Gem::Requirement
22
+ none: false
23
+ requirements:
24
+ - - ~>
25
+ - !ruby/object:Gem::Version
26
+ hash: 29
27
+ segments:
28
+ - 0
29
+ - 0
30
+ - 1
31
+ version: 0.0.1
32
+ requirement: *id001
33
+ type: :runtime
34
+ name: metaclass
23
35
  prerelease: false
24
- requirement: &id001 !ruby/object:Gem::Requirement
36
+ - !ruby/object:Gem::Dependency
37
+ version_requirements: &id002 !ruby/object:Gem::Requirement
25
38
  none: false
26
39
  requirements:
27
40
  - - ">="
@@ -30,9 +43,43 @@ dependencies:
30
43
  segments:
31
44
  - 0
32
45
  version: "0"
46
+ requirement: *id002
47
+ type: :development
48
+ name: rake
49
+ prerelease: false
50
+ - !ruby/object:Gem::Dependency
51
+ version_requirements: &id003 !ruby/object:Gem::Requirement
52
+ none: false
53
+ requirements:
54
+ - - ~>
55
+ - !ruby/object:Gem::Version
56
+ hash: 29
57
+ segments:
58
+ - 0
59
+ - 0
60
+ - 1
61
+ version: 0.0.1
62
+ requirement: *id003
63
+ type: :development
64
+ name: introspection
65
+ prerelease: false
66
+ - !ruby/object:Gem::Dependency
67
+ version_requirements: &id004 !ruby/object:Gem::Requirement
68
+ none: false
69
+ requirements:
70
+ - - ~>
71
+ - !ruby/object:Gem::Version
72
+ hash: 27
73
+ segments:
74
+ - 2
75
+ - 4
76
+ - 2
77
+ version: 2.4.2
78
+ requirement: *id004
33
79
  type: :development
34
- version_requirements: *id001
35
- description: " Mocking and stubbing library with JMock/SchMock syntax, which allows mocking and stubbing of methods on real (non-mock) classes.\n"
80
+ name: rdoc
81
+ prerelease: false
82
+ description: Mocking and stubbing library with JMock/SchMock syntax, which allows mocking and stubbing of methods on real (non-mock) classes.
36
83
  email: mocha-developer@googlegroups.com
37
84
  executables: []
38
85
 
@@ -42,6 +89,30 @@ extra_rdoc_files:
42
89
  - README.rdoc
43
90
  - COPYING.rdoc
44
91
  files:
92
+ - .gemtest
93
+ - COPYING.rdoc
94
+ - Gemfile
95
+ - Gemfile.minitest.1.3.0
96
+ - Gemfile.minitest.1.4.0
97
+ - Gemfile.minitest.1.4.1
98
+ - Gemfile.minitest.1.4.2
99
+ - Gemfile.minitest.2.0.0
100
+ - Gemfile.minitest.2.0.1
101
+ - Gemfile.minitest.2.3.0
102
+ - Gemfile.minitest.latest
103
+ - Gemfile.test-unit.2.0.0
104
+ - Gemfile.test-unit.2.0.1
105
+ - Gemfile.test-unit.2.0.3
106
+ - Gemfile.test-unit.latest
107
+ - MIT-LICENSE.rdoc
108
+ - README.rdoc
109
+ - RELEASE.rdoc
110
+ - Rakefile
111
+ - examples/misc.rb
112
+ - examples/mocha.rb
113
+ - examples/stubba.rb
114
+ - init.rb
115
+ - lib/mocha.rb
45
116
  - lib/mocha/any_instance_method.rb
46
117
  - lib/mocha/api.rb
47
118
  - lib/mocha/argument_iterator.rb
@@ -59,6 +130,8 @@ files:
59
130
  - lib/mocha/in_state_ordering_constraint.rb
60
131
  - lib/mocha/inspect.rb
61
132
  - lib/mocha/instance_method.rb
133
+ - lib/mocha/integration.rb
134
+ - lib/mocha/integration/mini_test.rb
62
135
  - lib/mocha/integration/mini_test/assertion_counter.rb
63
136
  - lib/mocha/integration/mini_test/exception_translation.rb
64
137
  - lib/mocha/integration/mini_test/version_13.rb
@@ -66,19 +139,18 @@ files:
66
139
  - lib/mocha/integration/mini_test/version_141.rb
67
140
  - lib/mocha/integration/mini_test/version_142_to_172.rb
68
141
  - lib/mocha/integration/mini_test/version_200.rb
69
- - lib/mocha/integration/mini_test/version_201_to_202.rb
70
- - lib/mocha/integration/mini_test.rb
142
+ - lib/mocha/integration/mini_test/version_201_to_222.rb
143
+ - lib/mocha/integration/mini_test/version_230_to_251.rb
144
+ - lib/mocha/integration/test_unit.rb
71
145
  - lib/mocha/integration/test_unit/assertion_counter.rb
72
146
  - lib/mocha/integration/test_unit/gem_version_200.rb
73
147
  - lib/mocha/integration/test_unit/gem_version_201_to_202.rb
74
- - lib/mocha/integration/test_unit/gem_version_203_to_209.rb
148
+ - lib/mocha/integration/test_unit/gem_version_203_to_220.rb
149
+ - lib/mocha/integration/test_unit/gem_version_230_to_233.rb
75
150
  - lib/mocha/integration/test_unit/ruby_version_185_and_below.rb
76
151
  - lib/mocha/integration/test_unit/ruby_version_186_and_above.rb
77
- - lib/mocha/integration/test_unit.rb
78
- - lib/mocha/integration.rb
79
152
  - lib/mocha/is_a.rb
80
153
  - lib/mocha/logger.rb
81
- - lib/mocha/metaclass.rb
82
154
  - lib/mocha/method_matcher.rb
83
155
  - lib/mocha/mock.rb
84
156
  - lib/mocha/mockery.rb
@@ -88,6 +160,7 @@ files:
88
160
  - lib/mocha/no_yields.rb
89
161
  - lib/mocha/object.rb
90
162
  - lib/mocha/options.rb
163
+ - lib/mocha/parameter_matchers.rb
91
164
  - lib/mocha/parameter_matchers/all_of.rb
92
165
  - lib/mocha/parameter_matchers/any_of.rb
93
166
  - lib/mocha/parameter_matchers/any_parameters.rb
@@ -109,7 +182,6 @@ files:
109
182
  - lib/mocha/parameter_matchers/regexp_matches.rb
110
183
  - lib/mocha/parameter_matchers/responds_with.rb
111
184
  - lib/mocha/parameter_matchers/yaml_equivalent.rb
112
- - lib/mocha/parameter_matchers.rb
113
185
  - lib/mocha/parameters_matcher.rb
114
186
  - lib/mocha/pretty_parameters.rb
115
187
  - lib/mocha/return_values.rb
@@ -119,17 +191,20 @@ files:
119
191
  - lib/mocha/standalone.rb
120
192
  - lib/mocha/state_machine.rb
121
193
  - lib/mocha/stubbing_error.rb
194
+ - lib/mocha/thrower.rb
122
195
  - lib/mocha/unexpected_invocation.rb
196
+ - lib/mocha/version.rb
123
197
  - lib/mocha/yield_parameters.rb
124
- - lib/mocha.rb
125
198
  - lib/mocha_standalone.rb
126
199
  - lib/stubba.rb
200
+ - mocha.gemspec
127
201
  - test/acceptance/acceptance_test_helper.rb
128
202
  - test/acceptance/api_test.rb
129
203
  - test/acceptance/bug_18914_test.rb
130
204
  - test/acceptance/bug_21465_test.rb
131
205
  - test/acceptance/bug_21563_test.rb
132
206
  - test/acceptance/exception_rescue_test.rb
207
+ - test/acceptance/expectations_on_multiple_methods_test.rb
133
208
  - test/acceptance/expected_invocation_count_test.rb
134
209
  - test/acceptance/failure_messages_test.rb
135
210
  - test/acceptance/minitest_test.rb
@@ -142,13 +217,24 @@ files:
142
217
  - test/acceptance/optional_parameters_test.rb
143
218
  - test/acceptance/parameter_matcher_test.rb
144
219
  - test/acceptance/partial_mocks_test.rb
220
+ - test/acceptance/raise_exception_test.rb
145
221
  - test/acceptance/return_value_test.rb
146
222
  - test/acceptance/sequence_test.rb
147
223
  - test/acceptance/states_test.rb
148
224
  - test/acceptance/stub_any_instance_method_test.rb
149
- - test/acceptance/stub_class_method_test.rb
225
+ - test/acceptance/stub_class_method_defined_on_active_record_association_proxy_test.rb
226
+ - test/acceptance/stub_class_method_defined_on_class_test.rb
227
+ - test/acceptance/stub_class_method_defined_on_module_test.rb
228
+ - test/acceptance/stub_class_method_defined_on_superclass_test.rb
150
229
  - test/acceptance/stub_everything_test.rb
151
- - test/acceptance/stub_instance_method_test.rb
230
+ - test/acceptance/stub_instance_method_defined_on_active_record_association_proxy_test.rb
231
+ - test/acceptance/stub_instance_method_defined_on_class_and_aliased_test.rb
232
+ - test/acceptance/stub_instance_method_defined_on_class_test.rb
233
+ - test/acceptance/stub_instance_method_defined_on_kernel_module_test.rb
234
+ - test/acceptance/stub_instance_method_defined_on_module_test.rb
235
+ - test/acceptance/stub_instance_method_defined_on_object_class_test.rb
236
+ - test/acceptance/stub_instance_method_defined_on_singleton_class_test.rb
237
+ - test/acceptance/stub_instance_method_defined_on_superclass_test.rb
152
238
  - test/acceptance/stub_module_method_test.rb
153
239
  - test/acceptance/stub_test.rb
154
240
  - test/acceptance/stubba_example_test.rb
@@ -163,6 +249,7 @@ files:
163
249
  - test/acceptance/stubbing_non_public_class_method_test.rb
164
250
  - test/acceptance/stubbing_non_public_instance_method_test.rb
165
251
  - test/acceptance/stubbing_on_non_mock_object_test.rb
252
+ - test/acceptance/throw_test.rb
166
253
  - test/acceptance/unstubbing_test.rb
167
254
  - test/deprecation_disabler.rb
168
255
  - test/execution_point.rb
@@ -185,7 +272,6 @@ files:
185
272
  - test/unit/expectation_test.rb
186
273
  - test/unit/hash_inspect_test.rb
187
274
  - test/unit/in_state_ordering_constraint_test.rb
188
- - test/unit/metaclass_test.rb
189
275
  - test/unit/method_matcher_test.rb
190
276
  - test/unit/mock_test.rb
191
277
  - test/unit/mockery_test.rb
@@ -217,17 +303,8 @@ files:
217
303
  - test/unit/single_yield_test.rb
218
304
  - test/unit/state_machine_test.rb
219
305
  - test/unit/string_inspect_test.rb
306
+ - test/unit/thrower_test.rb
220
307
  - test/unit/yield_parameters_test.rb
221
- - examples/misc.rb
222
- - examples/mocha.rb
223
- - examples/stubba.rb
224
- - COPYING.rdoc
225
- - MIT-LICENSE.rdoc
226
- - Rakefile
227
- - README.rdoc
228
- - RELEASE.rdoc
229
- - .gemtest
230
- has_rdoc: true
231
308
  homepage: http://mocha.rubyforge.org
232
309
  licenses: []
233
310
 
@@ -261,7 +338,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
261
338
  requirements: []
262
339
 
263
340
  rubyforge_project: mocha
264
- rubygems_version: 1.3.7
341
+ rubygems_version: 1.8.8
265
342
  signing_key:
266
343
  specification_version: 3
267
344
  summary: Mocking and stubbing library