mocha 0.13.3 → 0.14.0.alpha

Sign up to get free protection for your applications and to get access to all the features.
@@ -0,0 +1,7 @@
1
+ ---
2
+ SHA1:
3
+ metadata.gz: 3a39a1abf6d2c1771428d46d79ecb34fea2719ac
4
+ data.tar.gz: c1c02c7c92619f066660f0ed690a65535635cc23
5
+ SHA512:
6
+ metadata.gz: 7ce7f430d549d3ff0c90991adcc6bb20064f7459cb7eb5b820eddaf5e2d6d2d42f1c452f15b0c234f8561045618cf927f31ee7ebc56c1e02592182c73f034bd5
7
+ data.tar.gz: 412f870c117fd70013cd80ff95c5fe0dca4960862ebd77cd204429e0f2dd26de2ada9bfd9967eddad4d1c04950bde8e95e2a265d648be992ba6b0299c49c7295
data/README.md CHANGED
@@ -41,59 +41,6 @@ If you're loading Mocha using Bundler within a Rails application, you should ens
41
41
  # At bottom of test_helper.rb
42
42
  require "mocha/setup"
43
43
 
44
- Note: Using the latest version of Mocha (0.13.2) with the latest versions of Rails (e.g. 3.2.12) or _some_ recent versions of Rails (e.g. 3.1.10, or 3.0.19), you will see the following Mocha deprecation warning:
45
-
46
- *** Mocha deprecation warning: Change `require 'mocha'` to `require 'mocha/setup'`.
47
-
48
- This will happen until new versions of Rails are released incorporating the following pull requests:
49
-
50
- * 3-2-stable - https://github.com/rails/rails/pull/8200
51
- * ~~3-1-stable - https://github.com/rails/rails/pull/8871~~ [released in 3.1.11]
52
- * ~~3-0-stable - https://github.com/rails/rails/pull/8872~~ [released in 3.0.20]
53
-
54
- The deprecation warning will not cause any problems, but if you don't like seeing then you could do one of the following:
55
-
56
- ##### Option 1 - Disable Mocha deprecation warnings with a Rails initializer
57
-
58
- # config/mocha.rb
59
- if Rails.env.test? || Rails.env.development?
60
- require "mocha/version"
61
- require "mocha/deprecation"
62
- if Mocha::VERSION == "0.13.2" && Rails::VERSION::STRING == "3.2.12"
63
- Mocha::Deprecation.mode = :disabled
64
- end
65
- end
66
-
67
- Note 1: I have intentionally made this brittle against patch releases of Mocha and Rails, because this way you are more likely to notice when you no longer need the initializer.
68
- Note 2: This will not work with recent versions of the Test::Unit gem (see below).
69
-
70
- ##### Option 2 - Use "edge" Rails or one of the relevant "stable" branches of Rails
71
-
72
- # Gemfile
73
- gem "rails", git: "git://github.com/rails/rails.git", branch: "3-2-stable"
74
- group :test do
75
- gem "mocha", :require => false
76
- end
77
-
78
- # test/test_helper.rb
79
- require "mocha/setup"
80
-
81
- ##### Option 3 - Downgrade to the latest 0.12.x version of Mocha
82
-
83
- # Gemfile in Rails app
84
- gem "mocha", "~> 0.12.10", :require => false
85
-
86
- # At bottom of test_helper.rb
87
- require "mocha"
88
-
89
- Note: This isn't as bad as it sounds, because there aren't many changes in Mocha 0.13.x that are not in 0.12.x.
90
-
91
- #### Rails with Test::Unit
92
-
93
- Unfortunately due to Rails relying on Mocha & Test::Unit internals, there is a problem with using recent released versions of Rails with the latest version of Mocha and recent versions of the Test::Unit gem.
94
-
95
- In this case you will have to use either Option 2 or Option 3 (see above). Option 1 will not work.
96
-
97
44
  #### Rails Plugin
98
45
 
99
46
  Install the Rails plugin...
@@ -104,9 +51,10 @@ Note: As of version 0.9.8, the Mocha plugin is not automatically loaded at plugi
104
51
 
105
52
  #### Know Issues
106
53
 
107
- * Versions 0.10.2, 0.10.3 & 0.11.0 of the Mocha gem were broken.
108
- * Versions 0.9.6 & 0.9.7 of the Mocha Rails plugin were broken.
109
- * Please do not use these versions.
54
+ * 0.13.x versions cause a harmless, but annoying, deprecation warning when used with Rails 3.2.0-3.2.12, 3.1.0-3.1.10 & 3.0.0-3.0.19.
55
+ * 0.11.x versions don't work with Rails 3.2.13 (`TypeError: superclass mismatch for class ExpectationError`). See #115.
56
+ * Versions 0.10.2, 0.10.3 & 0.11.0 of the Mocha gem were broken. Please do not use these versions.
57
+ * Versions 0.9.6 & 0.9.7 of the Mocha Rails plugin were broken. Please do not use these versions.
110
58
 
111
59
  ### Usage
112
60
 
data/RELEASE.md CHANGED
@@ -1,5 +1,10 @@
1
1
  # Release Notes
2
2
 
3
+ ## 0.14.0.alpha
4
+
5
+ * Add speculative support for Minitest v5. Due to incompatibilities it has not yet been possible to run the Mocha test suite against Minitest v5. However, @zenspider (author of Minitest) provided the patch and he has tested it against Rails v4. Fixes #156. Thanks to @zenspider.
6
+ * Documentation updates.
7
+
3
8
  ## 0.13.3
4
9
  * Allow `Mocha::ParameterMatchers#includes` to accept multiple items. Thanks to @simao.
5
10
  * Allow stubbing of *private* `Kernel` methods. Fixes #134. Thanks to @camski for reporting.
@@ -40,9 +40,15 @@ module Mocha
40
40
  MiniTest::Nothing
41
41
  ].detect { |m| m.applicable_to?(mini_test_version) }
42
42
 
43
- unless ::MiniTest::Unit::TestCase < integration_module
43
+ target = if defined? Minitest::Test then
44
+ ::Minitest::Test
45
+ else
46
+ ::MiniTest::Unit::TestCase
47
+ end
48
+
49
+ unless target < integration_module
44
50
  Debug.puts "Applying #{integration_module.description}"
45
- ::MiniTest::Unit::TestCase.send(:include, integration_module)
51
+ target.send(:include, integration_module)
46
52
  end
47
53
  end
48
54
  true
@@ -1,3 +1,3 @@
1
1
  module Mocha
2
- VERSION = "0.13.3"
2
+ VERSION = "0.14.0.alpha"
3
3
  end
metadata CHANGED
@@ -1,105 +1,64 @@
1
- --- !ruby/object:Gem::Specification
1
+ --- !ruby/object:Gem::Specification
2
2
  name: mocha
3
- version: !ruby/object:Gem::Version
4
- hash: 45
5
- prerelease:
6
- segments:
7
- - 0
8
- - 13
9
- - 3
10
- version: 0.13.3
3
+ version: !ruby/object:Gem::Version
4
+ version: 0.14.0.alpha
11
5
  platform: ruby
12
- authors:
6
+ authors:
13
7
  - James Mead
14
8
  autorequire:
15
9
  bindir: bin
16
10
  cert_chain: []
17
-
18
- date: 2013-03-07 00:00:00 Z
19
- dependencies:
20
- - !ruby/object:Gem::Dependency
21
- version_requirements: &id001 !ruby/object:Gem::Requirement
22
- none: false
23
- requirements:
11
+ date: 2013-05-08 00:00:00.000000000 Z
12
+ dependencies:
13
+ - !ruby/object:Gem::Dependency
14
+ name: metaclass
15
+ requirement: !ruby/object:Gem::Requirement
16
+ requirements:
24
17
  - - ~>
25
- - !ruby/object:Gem::Version
26
- hash: 29
27
- segments:
28
- - 0
29
- - 0
30
- - 1
18
+ - !ruby/object:Gem::Version
31
19
  version: 0.0.1
32
- prerelease: false
33
20
  type: :runtime
34
- name: metaclass
35
- requirement: *id001
36
- - !ruby/object:Gem::Dependency
37
- version_requirements: &id002 !ruby/object:Gem::Requirement
38
- none: false
39
- requirements:
40
- - - ">="
41
- - !ruby/object:Gem::Version
42
- hash: 3
43
- segments:
44
- - 0
45
- version: "0"
46
21
  prerelease: false
47
- type: :development
48
- name: rake
49
- requirement: *id002
50
- - !ruby/object:Gem::Dependency
51
- version_requirements: &id003 !ruby/object:Gem::Requirement
52
- none: false
53
- requirements:
22
+ version_requirements: !ruby/object:Gem::Requirement
23
+ requirements:
54
24
  - - ~>
55
- - !ruby/object:Gem::Version
56
- hash: 29
57
- segments:
58
- - 0
59
- - 0
60
- - 1
25
+ - !ruby/object:Gem::Version
61
26
  version: 0.0.1
62
- prerelease: false
27
+ - !ruby/object:Gem::Dependency
28
+ name: rake
29
+ requirement: !ruby/object:Gem::Requirement
30
+ requirements:
31
+ - - '>='
32
+ - !ruby/object:Gem::Version
33
+ version: '0'
63
34
  type: :development
64
- name: introspection
65
- requirement: *id003
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: 3
73
- segments:
74
- - 0
75
- version: "0"
76
35
  prerelease: false
77
- type: :development
78
- name: yard
79
- requirement: *id004
80
- - !ruby/object:Gem::Dependency
81
- version_requirements: &id005 !ruby/object:Gem::Requirement
82
- none: false
83
- requirements:
36
+ version_requirements: !ruby/object:Gem::Requirement
37
+ requirements:
38
+ - - '>='
39
+ - !ruby/object:Gem::Version
40
+ version: '0'
41
+ - !ruby/object:Gem::Dependency
42
+ name: introspection
43
+ requirement: !ruby/object:Gem::Requirement
44
+ requirements:
84
45
  - - ~>
85
- - !ruby/object:Gem::Version
86
- hash: 1
87
- segments:
88
- - 1
89
- version: "1"
90
- prerelease: false
46
+ - !ruby/object:Gem::Version
47
+ version: 0.0.1
91
48
  type: :development
92
- name: redcarpet
93
- requirement: *id005
94
- description: Mocking and stubbing library with JMock/SchMock syntax, which allows mocking and stubbing of methods on real (non-mock) classes.
49
+ prerelease: false
50
+ version_requirements: !ruby/object:Gem::Requirement
51
+ requirements:
52
+ - - ~>
53
+ - !ruby/object:Gem::Version
54
+ version: 0.0.1
55
+ description: Mocking and stubbing library with JMock/SchMock syntax, which allows
56
+ mocking and stubbing of methods on real (non-mock) classes.
95
57
  email: mocha-developer@googlegroups.com
96
58
  executables: []
97
-
98
59
  extensions: []
99
-
100
60
  extra_rdoc_files: []
101
-
102
- files:
61
+ files:
103
62
  - .gemtest
104
63
  - .yardopts
105
64
  - COPYING.md
@@ -341,37 +300,25 @@ files:
341
300
  - yard-templates/default/layout/html/setup.rb
342
301
  homepage: http://gofreerange.com/mocha/docs
343
302
  licenses: []
344
-
303
+ metadata: {}
345
304
  post_install_message:
346
305
  rdoc_options: []
347
-
348
- require_paths:
306
+ require_paths:
349
307
  - lib
350
- required_ruby_version: !ruby/object:Gem::Requirement
351
- none: false
352
- requirements:
353
- - - ">="
354
- - !ruby/object:Gem::Version
355
- hash: 3
356
- segments:
357
- - 0
358
- version: "0"
359
- required_rubygems_version: !ruby/object:Gem::Requirement
360
- none: false
361
- requirements:
362
- - - ">="
363
- - !ruby/object:Gem::Version
364
- hash: 3
365
- segments:
366
- - 0
367
- version: "0"
308
+ required_ruby_version: !ruby/object:Gem::Requirement
309
+ requirements:
310
+ - - '>='
311
+ - !ruby/object:Gem::Version
312
+ version: '0'
313
+ required_rubygems_version: !ruby/object:Gem::Requirement
314
+ requirements:
315
+ - - '>='
316
+ - !ruby/object:Gem::Version
317
+ version: '0'
368
318
  requirements: []
369
-
370
319
  rubyforge_project: mocha
371
- rubygems_version: 1.8.24
320
+ rubygems_version: 2.0.0
372
321
  signing_key:
373
322
  specification_version: 3
374
323
  summary: Mocking and stubbing library
375
324
  test_files: []
376
-
377
- has_rdoc: yard