mocha-macruby 0.9.8.20100129120100 → 0.9.9.20101102121900

Sign up to get free protection for your applications and to get access to all the features.
Files changed (113) hide show
  1. data/COPYING.rdoc +3 -0
  2. data/{MIT-LICENSE → MIT-LICENSE.rdoc} +0 -0
  3. data/{README → README.rdoc} +7 -7
  4. data/{RELEASE → RELEASE.rdoc} +18 -0
  5. data/Rakefile +44 -28
  6. data/lib/mocha.rb +1 -0
  7. data/lib/mocha/class_method.rb +1 -3
  8. data/lib/mocha/expectation.rb +37 -34
  9. data/lib/mocha/integration/mini_test.rb +32 -4
  10. data/lib/mocha/integration/mini_test/exception_translation.rb +20 -0
  11. data/lib/mocha/integration/mini_test/{version_131_and_above.rb → version_13.rb} +7 -13
  12. data/lib/mocha/integration/mini_test/version_140.rb +52 -0
  13. data/lib/mocha/integration/mini_test/version_141.rb +56 -0
  14. data/lib/mocha/integration/mini_test/version_142_and_above.rb +47 -0
  15. data/lib/mocha/integration/test_unit.rb +23 -8
  16. data/lib/mocha/integration/test_unit/gem_version_200.rb +3 -0
  17. data/lib/mocha/integration/test_unit/{gem_version_201_and_above.rb → gem_version_201_to_202.rb} +4 -1
  18. data/lib/mocha/integration/test_unit/gem_version_203_to_209.rb +52 -0
  19. data/lib/mocha/integration/test_unit/ruby_version_185_and_below.rb +3 -0
  20. data/lib/mocha/integration/test_unit/ruby_version_186_and_above.rb +3 -0
  21. data/lib/mocha/mock.rb +33 -18
  22. data/lib/mocha/module_method.rb +1 -1
  23. data/lib/mocha/object.rb +144 -160
  24. data/lib/mocha/options.rb +1 -0
  25. data/lib/mocha/parameter_matchers/base.rb +50 -2
  26. data/test/acceptance/acceptance_test_helper.rb +1 -1
  27. data/test/acceptance/api_test.rb +1 -1
  28. data/test/acceptance/bug_18914_test.rb +1 -1
  29. data/test/acceptance/bug_21465_test.rb +1 -1
  30. data/test/acceptance/bug_21563_test.rb +1 -1
  31. data/test/acceptance/expected_invocation_count_test.rb +1 -1
  32. data/test/acceptance/failure_messages_test.rb +1 -1
  33. data/test/acceptance/minitest_test.rb +128 -124
  34. data/test/acceptance/mocha_example_test.rb +1 -1
  35. data/test/acceptance/mocha_test_result_test.rb +1 -1
  36. data/test/acceptance/mock_test.rb +1 -1
  37. data/test/acceptance/mock_with_initializer_block_test.rb +1 -1
  38. data/test/acceptance/mocked_methods_dispatch_test.rb +1 -1
  39. data/test/acceptance/optional_parameters_test.rb +1 -1
  40. data/test/acceptance/parameter_matcher_test.rb +38 -1
  41. data/test/acceptance/partial_mocks_test.rb +1 -1
  42. data/test/acceptance/return_value_test.rb +1 -1
  43. data/test/acceptance/sequence_test.rb +1 -1
  44. data/test/acceptance/states_test.rb +1 -1
  45. data/test/acceptance/stub_any_instance_method_test.rb +5 -2
  46. data/test/acceptance/stub_class_method_test.rb +5 -2
  47. data/test/acceptance/stub_everything_test.rb +1 -1
  48. data/test/acceptance/stub_instance_method_test.rb +5 -2
  49. data/test/acceptance/stub_module_method_test.rb +3 -3
  50. data/test/acceptance/stub_test.rb +1 -1
  51. data/test/acceptance/stubba_example_test.rb +1 -1
  52. data/test/acceptance/stubba_test.rb +1 -1
  53. data/test/acceptance/stubba_test_result_test.rb +1 -1
  54. data/test/acceptance/stubbing_error_backtrace_test.rb +1 -1
  55. data/test/acceptance/stubbing_method_unnecessarily_test.rb +1 -1
  56. data/test/acceptance/stubbing_non_existent_any_instance_method_test.rb +5 -5
  57. data/test/acceptance/stubbing_non_existent_class_method_test.rb +5 -5
  58. data/test/acceptance/stubbing_non_existent_instance_method_test.rb +5 -5
  59. data/test/acceptance/stubbing_non_public_any_instance_method_test.rb +9 -9
  60. data/test/acceptance/stubbing_non_public_class_method_test.rb +9 -9
  61. data/test/acceptance/stubbing_non_public_instance_method_test.rb +9 -9
  62. data/test/acceptance/stubbing_on_non_mock_object_test.rb +5 -5
  63. data/test/mini_test_result.rb +74 -0
  64. data/test/test_helper.rb +3 -1
  65. data/test/test_runner.rb +25 -11
  66. data/test/unit/any_instance_method_test.rb +1 -1
  67. data/test/unit/array_inspect_test.rb +1 -1
  68. data/test/unit/backtrace_filter_test.rb +1 -1
  69. data/test/unit/cardinality_test.rb +1 -1
  70. data/test/unit/central_test.rb +1 -1
  71. data/test/unit/change_state_side_effect_test.rb +1 -1
  72. data/test/unit/class_method_test.rb +2 -2
  73. data/test/unit/configuration_test.rb +1 -1
  74. data/test/unit/date_time_inspect_test.rb +1 -1
  75. data/test/unit/exception_raiser_test.rb +1 -1
  76. data/test/unit/expectation_list_test.rb +1 -1
  77. data/test/unit/expectation_test.rb +1 -1
  78. data/test/unit/hash_inspect_test.rb +1 -1
  79. data/test/unit/in_state_ordering_constraint_test.rb +1 -1
  80. data/test/unit/metaclass_test.rb +1 -1
  81. data/test/unit/method_matcher_test.rb +1 -1
  82. data/test/unit/mock_test.rb +16 -14
  83. data/test/unit/mockery_test.rb +1 -1
  84. data/test/unit/multiple_yields_test.rb +1 -1
  85. data/test/unit/no_yields_test.rb +1 -1
  86. data/test/unit/object_inspect_test.rb +10 -9
  87. data/test/unit/object_test.rb +11 -10
  88. data/test/unit/parameter_matchers/all_of_test.rb +1 -1
  89. data/test/unit/parameter_matchers/any_of_test.rb +1 -1
  90. data/test/unit/parameter_matchers/anything_test.rb +1 -1
  91. data/test/unit/parameter_matchers/equals_test.rb +1 -1
  92. data/test/unit/parameter_matchers/has_entries_test.rb +1 -1
  93. data/test/unit/parameter_matchers/has_entry_test.rb +1 -1
  94. data/test/unit/parameter_matchers/has_key_test.rb +1 -1
  95. data/test/unit/parameter_matchers/has_value_test.rb +1 -1
  96. data/test/unit/parameter_matchers/includes_test.rb +5 -5
  97. data/test/unit/parameter_matchers/instance_of_test.rb +2 -2
  98. data/test/unit/parameter_matchers/is_a_test.rb +1 -1
  99. data/test/unit/parameter_matchers/kind_of_test.rb +1 -1
  100. data/test/unit/parameter_matchers/not_test.rb +1 -1
  101. data/test/unit/parameter_matchers/regexp_matches_test.rb +1 -1
  102. data/test/unit/parameter_matchers/responds_with_test.rb +1 -1
  103. data/test/unit/parameter_matchers/yaml_equivalent_test.rb +1 -1
  104. data/test/unit/parameters_matcher_test.rb +1 -1
  105. data/test/unit/return_values_test.rb +1 -1
  106. data/test/unit/sequence_test.rb +1 -1
  107. data/test/unit/single_return_value_test.rb +1 -1
  108. data/test/unit/single_yield_test.rb +1 -1
  109. data/test/unit/state_machine_test.rb +1 -1
  110. data/test/unit/string_inspect_test.rb +1 -1
  111. data/test/unit/yield_parameters_test.rb +1 -1
  112. metadata +43 -19
  113. data/COPYING +0 -3
@@ -1,4 +1,4 @@
1
- require File.join(File.dirname(__FILE__), "..", "..", "test_helper")
1
+ require File.expand_path('../../../test_helper', __FILE__)
2
2
 
3
3
  require 'mocha/parameter_matchers/has_entries'
4
4
  require 'mocha/parameter_matchers/object'
@@ -1,4 +1,4 @@
1
- require File.join(File.dirname(__FILE__), "..", "..", "test_helper")
1
+ require File.expand_path('../../../test_helper', __FILE__)
2
2
 
3
3
  require 'mocha/parameter_matchers/has_entry'
4
4
  require 'mocha/parameter_matchers/object'
@@ -1,4 +1,4 @@
1
- require File.join(File.dirname(__FILE__), "..", "..", "test_helper")
1
+ require File.expand_path('../../../test_helper', __FILE__)
2
2
 
3
3
  require 'mocha/parameter_matchers/has_key'
4
4
  require 'mocha/parameter_matchers/object'
@@ -1,4 +1,4 @@
1
- require File.join(File.dirname(__FILE__), "..", "..", "test_helper")
1
+ require File.expand_path('../../../test_helper', __FILE__)
2
2
 
3
3
  require 'mocha/parameter_matchers/has_value'
4
4
  require 'mocha/parameter_matchers/object'
@@ -1,4 +1,4 @@
1
- require File.join(File.dirname(__FILE__), "..", "..", "test_helper")
1
+ require File.expand_path('../../../test_helper', __FILE__)
2
2
 
3
3
  require 'mocha/parameter_matchers/includes'
4
4
  require 'mocha/inspect'
@@ -33,12 +33,12 @@ class IncludesTest < Test::Unit::TestCase
33
33
  end
34
34
 
35
35
  def test_should_not_raise_error_on_argument_that_does_not_respond_to_include
36
- matcher = includes(:x)
37
- assert_nothing_raised { matcher.matches?([:x]) }
36
+ matcher = includes(1)
37
+ assert_nothing_raised { matcher.matches?([1]) }
38
38
  end
39
39
 
40
40
  def test_should_not_match_on_argument_that_does_not_respond_to_include
41
- matcher = includes(:x)
42
- assert !matcher.matches?([:x])
41
+ matcher = includes(1)
42
+ assert !matcher.matches?([1])
43
43
  end
44
44
  end
@@ -1,4 +1,4 @@
1
- require File.join(File.dirname(__FILE__), "..", "..", "test_helper")
1
+ require File.expand_path('../../../test_helper', __FILE__)
2
2
 
3
3
  require 'mocha/parameter_matchers/instance_of'
4
4
  require 'mocha/inspect'
@@ -19,7 +19,7 @@ class InstanceOfTest < Test::Unit::TestCase
19
19
 
20
20
  def test_should_describe_matcher
21
21
  matcher = instance_of(String)
22
- assert_equal "instance_of(#{ on_macruby? ? 'NSMutableString' : 'String' })", matcher.mocha_inspect
22
+ assert_equal "instance_of(String)", matcher.mocha_inspect
23
23
  end
24
24
 
25
25
  end
@@ -1,4 +1,4 @@
1
- require File.join(File.dirname(__FILE__), "..", "..", "test_helper")
1
+ require File.expand_path('../../../test_helper', __FILE__)
2
2
 
3
3
  require 'mocha/parameter_matchers/is_a'
4
4
  require 'mocha/inspect'
@@ -1,4 +1,4 @@
1
- require File.join(File.dirname(__FILE__), "..", "..", "test_helper")
1
+ require File.expand_path('../../../test_helper', __FILE__)
2
2
 
3
3
  require 'mocha/parameter_matchers/kind_of'
4
4
  require 'mocha/inspect'
@@ -1,4 +1,4 @@
1
- require File.join(File.dirname(__FILE__), "..", "..", "test_helper")
1
+ require File.expand_path('../../../test_helper', __FILE__)
2
2
 
3
3
  require 'mocha/parameter_matchers/not'
4
4
  require 'mocha/inspect'
@@ -1,4 +1,4 @@
1
- require File.join(File.dirname(__FILE__), "..", "..", "test_helper")
1
+ require File.expand_path('../../../test_helper', __FILE__)
2
2
 
3
3
  require 'mocha/parameter_matchers/regexp_matches'
4
4
  require 'mocha/inspect'
@@ -1,4 +1,4 @@
1
- require File.join(File.dirname(__FILE__), "..", "..", "test_helper")
1
+ require File.expand_path('../../../test_helper', __FILE__)
2
2
 
3
3
  require 'mocha/parameter_matchers/responds_with'
4
4
  require 'mocha/inspect'
@@ -1,4 +1,4 @@
1
- require File.join(File.dirname(__FILE__), "..", "..", "test_helper")
1
+ require File.expand_path('../../../test_helper', __FILE__)
2
2
 
3
3
  require 'mocha/parameter_matchers/yaml_equivalent'
4
4
  require 'mocha/inspect'
@@ -1,4 +1,4 @@
1
- require File.join(File.dirname(__FILE__), "..", "test_helper")
1
+ require File.expand_path('../../test_helper', __FILE__)
2
2
  require 'mocha/parameters_matcher'
3
3
 
4
4
  class ParametersMatcherTest < Test::Unit::TestCase
@@ -1,4 +1,4 @@
1
- require File.join(File.dirname(__FILE__), "..", "test_helper")
1
+ require File.expand_path('../../test_helper', __FILE__)
2
2
 
3
3
  require 'mocha/return_values'
4
4
 
@@ -1,4 +1,4 @@
1
- require File.join(File.dirname(__FILE__), "..", "test_helper")
1
+ require File.expand_path('../../test_helper', __FILE__)
2
2
  require 'mocha/sequence'
3
3
  require 'mocha/expectation'
4
4
 
@@ -1,4 +1,4 @@
1
- require File.join(File.dirname(__FILE__), "..", "test_helper")
1
+ require File.expand_path('../../test_helper', __FILE__)
2
2
 
3
3
  require 'mocha/single_return_value'
4
4
 
@@ -1,4 +1,4 @@
1
- require File.join(File.dirname(__FILE__), "..", "test_helper")
1
+ require File.expand_path('../../test_helper', __FILE__)
2
2
 
3
3
  require 'mocha/single_yield'
4
4
 
@@ -1,4 +1,4 @@
1
- require File.join(File.dirname(__FILE__), "..", "test_helper")
1
+ require File.expand_path('../../test_helper', __FILE__)
2
2
 
3
3
  require 'mocha/state_machine'
4
4
 
@@ -1,4 +1,4 @@
1
- require File.join(File.dirname(__FILE__), "..", "test_helper")
1
+ require File.expand_path('../../test_helper', __FILE__)
2
2
  require 'mocha/inspect'
3
3
 
4
4
  class StringInspectTest < Test::Unit::TestCase
@@ -1,4 +1,4 @@
1
- require File.join(File.dirname(__FILE__), "..", "test_helper")
1
+ require File.expand_path('../../test_helper', __FILE__)
2
2
 
3
3
  require 'mocha/yield_parameters'
4
4
  require 'mocha/no_yields'
metadata CHANGED
@@ -1,7 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: mocha-macruby
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.9.8.20100129120100
4
+ hash: 40202204243835
5
+ prerelease: false
6
+ segments:
7
+ - 0
8
+ - 9
9
+ - 9
10
+ - 20101102121900
11
+ version: 0.9.9.20101102121900
5
12
  platform: ruby
6
13
  authors:
7
14
  - James Mead
@@ -10,19 +17,23 @@ autorequire:
10
17
  bindir: bin
11
18
  cert_chain: []
12
19
 
13
- date: 2009-09-18 00:00:00 +02:00
20
+ date: 2010-11-02 00:00:00 +01:00
14
21
  default_executable:
15
22
  dependencies:
16
23
  - !ruby/object:Gem::Dependency
17
24
  name: rake
18
- type: :runtime
19
- version_requirement:
20
- version_requirements: !ruby/object:Gem::Requirement
25
+ prerelease: false
26
+ requirement: &id001 !ruby/object:Gem::Requirement
27
+ none: false
21
28
  requirements:
22
29
  - - ">="
23
30
  - !ruby/object:Gem::Version
31
+ hash: 3
32
+ segments:
33
+ - 0
24
34
  version: "0"
25
- version:
35
+ type: :runtime
36
+ version_requirements: *id001
26
37
  description: " Mocking and stubbing library with JMock/SchMock syntax, which allows mocking and stubbing of methods on real (non-mock) classes.\n"
27
38
  email: mocha-developer@googlegroups.com
28
39
  executables: []
@@ -30,8 +41,8 @@ executables: []
30
41
  extensions: []
31
42
 
32
43
  extra_rdoc_files:
33
- - README
34
- - COPYING
44
+ - README.rdoc
45
+ - COPYING.rdoc
35
46
  files:
36
47
  - lib/mocha/any_instance_method.rb
37
48
  - lib/mocha/api.rb
@@ -51,11 +62,16 @@ files:
51
62
  - lib/mocha/inspect.rb
52
63
  - lib/mocha/instance_method.rb
53
64
  - lib/mocha/integration/mini_test/assertion_counter.rb
54
- - lib/mocha/integration/mini_test/version_131_and_above.rb
65
+ - lib/mocha/integration/mini_test/exception_translation.rb
66
+ - lib/mocha/integration/mini_test/version_13.rb
67
+ - lib/mocha/integration/mini_test/version_140.rb
68
+ - lib/mocha/integration/mini_test/version_141.rb
69
+ - lib/mocha/integration/mini_test/version_142_and_above.rb
55
70
  - lib/mocha/integration/mini_test.rb
56
71
  - lib/mocha/integration/test_unit/assertion_counter.rb
57
72
  - lib/mocha/integration/test_unit/gem_version_200.rb
58
- - lib/mocha/integration/test_unit/gem_version_201_and_above.rb
73
+ - lib/mocha/integration/test_unit/gem_version_201_to_202.rb
74
+ - lib/mocha/integration/test_unit/gem_version_203_to_209.rb
59
75
  - lib/mocha/integration/test_unit/ruby_version_185_and_below.rb
60
76
  - lib/mocha/integration/test_unit/ruby_version_186_and_above.rb
61
77
  - lib/mocha/integration/test_unit.rb
@@ -71,6 +87,7 @@ files:
71
87
  - lib/mocha/names.rb
72
88
  - lib/mocha/no_yields.rb
73
89
  - lib/mocha/object.rb
90
+ - lib/mocha/options.rb
74
91
  - lib/mocha/parameter_matchers/all_of.rb
75
92
  - lib/mocha/parameter_matchers/any_of.rb
76
93
  - lib/mocha/parameter_matchers/any_parameters.rb
@@ -146,6 +163,7 @@ files:
146
163
  - test/deprecation_disabler.rb
147
164
  - test/execution_point.rb
148
165
  - test/method_definer.rb
166
+ - test/mini_test_result.rb
149
167
  - test/simple_counter.rb
150
168
  - test/test_helper.rb
151
169
  - test/test_runner.rb
@@ -199,13 +217,13 @@ files:
199
217
  - examples/misc.rb
200
218
  - examples/mocha.rb
201
219
  - examples/stubba.rb
202
- - COPYING
203
- - MIT-LICENSE
220
+ - COPYING.rdoc
221
+ - MIT-LICENSE.rdoc
204
222
  - Rakefile
205
- - README
206
- - RELEASE
223
+ - README.rdoc
224
+ - RELEASE.rdoc
207
225
  has_rdoc: true
208
- homepage: http://github.com/alloy/mocha/tree/macruby
226
+ homepage: http://mocha.rubyforge.org
209
227
  licenses: []
210
228
 
211
229
  post_install_message:
@@ -213,26 +231,32 @@ rdoc_options:
213
231
  - --title
214
232
  - Mocha
215
233
  - --main
216
- - README
234
+ - README.rdoc
217
235
  - --line-numbers
218
236
  require_paths:
219
237
  - lib
220
238
  required_ruby_version: !ruby/object:Gem::Requirement
239
+ none: false
221
240
  requirements:
222
241
  - - ">="
223
242
  - !ruby/object:Gem::Version
243
+ hash: 3
244
+ segments:
245
+ - 0
224
246
  version: "0"
225
- version:
226
247
  required_rubygems_version: !ruby/object:Gem::Requirement
248
+ none: false
227
249
  requirements:
228
250
  - - ">="
229
251
  - !ruby/object:Gem::Version
252
+ hash: 3
253
+ segments:
254
+ - 0
230
255
  version: "0"
231
- version:
232
256
  requirements: []
233
257
 
234
258
  rubyforge_project: mocha
235
- rubygems_version: 1.3.5
259
+ rubygems_version: 1.3.7
236
260
  signing_key:
237
261
  specification_version: 3
238
262
  summary: Mocking and stubbing library
data/COPYING DELETED
@@ -1,3 +0,0 @@
1
- Copyright Revieworld Ltd. 2006
2
-
3
- You may use, copy and redistribute this library under the same terms as Ruby itself (see http://www.ruby-lang.org/en/LICENSE.txt) or under the MIT license (see MIT-LICENSE file).