mocha 1.15.0 → 1.16.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/RELEASE.md +11 -0
- data/lib/mocha/configuration.rb +13 -2
- data/lib/mocha/version.rb +1 -1
- metadata +6 -6
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: dd831959184fe3eecebdf969b343f35890f555b638aade8a24100ec68fcc1dbf
|
4
|
+
data.tar.gz: 4bbb00fdfb329c95cee458c9a0ba9d79519183794ba843646b30368300d48b85
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 7193325ccc907fddeb7c779ba632877e363a633a642096c26ea866595449d0d0f0e8674cd2af06020ca5486e4553a97e573bb73acf89e35b0a8144af320c6b79
|
7
|
+
data.tar.gz: 7e761bb099334893252ea4652348868ab4125d73fa225a0b50da6bfbc92a83b75471aeb1e4e80a2949f39ecbf672a019077229ff7e8ae65f224c74b92451a144
|
data/RELEASE.md
CHANGED
@@ -1,5 +1,16 @@
|
|
1
1
|
# Release Notes
|
2
2
|
|
3
|
+
## 1.16.0
|
4
|
+
|
5
|
+
### External changes
|
6
|
+
|
7
|
+
* Default `Configuration#reinstate_undocumented_behaviour_from_v1_9=` to `false` (6fcaf947)
|
8
|
+
* Deprecate `Configuration#reinstate_undocumented_behaviour_from_v1_9=` (a797c5fd)
|
9
|
+
|
10
|
+
### Internal changes
|
11
|
+
|
12
|
+
* Remove redundant deprecation disabling in MockTest (dc8ca969)
|
13
|
+
|
3
14
|
## 1.15.0
|
4
15
|
|
5
16
|
### External changes
|
data/lib/mocha/configuration.rb
CHANGED
@@ -43,7 +43,7 @@ module Mocha
|
|
43
43
|
:stubbing_non_public_method => :allow,
|
44
44
|
:stubbing_method_on_nil => :prevent,
|
45
45
|
:display_matching_invocations_on_failure => false,
|
46
|
-
:reinstate_undocumented_behaviour_from_v1_9 =>
|
46
|
+
:reinstate_undocumented_behaviour_from_v1_9 => false
|
47
47
|
}.freeze
|
48
48
|
|
49
49
|
attr_reader :options
|
@@ -258,7 +258,8 @@ module Mocha
|
|
258
258
|
#
|
259
259
|
# Enabling this configuration option reinstates the previous behaviour, but displays a deprecation warning.
|
260
260
|
#
|
261
|
-
# @param [Boolean] value +true+ to reinstate undocumented behaviour;
|
261
|
+
# @param [Boolean] value +true+ to reinstate undocumented behaviour; disabled by default.
|
262
|
+
# @deprecated Fix deprecation warnings caused by reliance on v1.9 behaviour and remove calls to this method.
|
262
263
|
#
|
263
264
|
# @example Reinstate undocumented behaviour for {API#mock}
|
264
265
|
# Mocha.configure do |c|
|
@@ -295,6 +296,16 @@ module Mocha
|
|
295
296
|
# foo.my_method # => does *not* raise LocalJumpError when no block is supplied
|
296
297
|
#
|
297
298
|
def reinstate_undocumented_behaviour_from_v1_9=(value)
|
299
|
+
if value
|
300
|
+
sentence1 = 'Configuration#reinstate_undocumented_behaviour_from_v1_9= will be removed in the future.'
|
301
|
+
sentence2 = 'Fix deprecation warnings caused by reliance on v1.9 behaviour.'
|
302
|
+
sentence3 = 'See docs for API#mock, API#stub, API#stub_everything, Expectation#yields and Expectation#multiple_yields.'
|
303
|
+
Deprecation.warning([sentence1, sentence2, sentence3].join(' '))
|
304
|
+
else
|
305
|
+
sentence1 = 'Configuration#reinstate_undocumented_behaviour_from_v1_9= is unnecessarily being set to false, because this is now the default value.'
|
306
|
+
sentence2 = 'Configuration#reinstate_undocumented_behaviour_from_v1_9= will be removed in the future, so you should avoid calling it.'
|
307
|
+
Deprecation.warning([sentence1, sentence2].join(' '))
|
308
|
+
end
|
298
309
|
@options[:reinstate_undocumented_behaviour_from_v1_9] = value
|
299
310
|
end
|
300
311
|
|
data/lib/mocha/version.rb
CHANGED
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: mocha
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 1.
|
4
|
+
version: 1.16.0
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- James Mead
|
8
|
-
autorequire:
|
8
|
+
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2022-
|
11
|
+
date: 2022-10-18 00:00:00.000000000 Z
|
12
12
|
dependencies: []
|
13
13
|
description: Mocking and stubbing library with JMock/SchMock syntax, which allows
|
14
14
|
mocking and stubbing of methods on real (non-mock) classes.
|
@@ -139,7 +139,7 @@ licenses:
|
|
139
139
|
- MIT
|
140
140
|
- BSD-2-Clause
|
141
141
|
metadata: {}
|
142
|
-
post_install_message:
|
142
|
+
post_install_message:
|
143
143
|
rdoc_options: []
|
144
144
|
require_paths:
|
145
145
|
- lib
|
@@ -154,8 +154,8 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
154
154
|
- !ruby/object:Gem::Version
|
155
155
|
version: '0'
|
156
156
|
requirements: []
|
157
|
-
rubygems_version: 3.
|
158
|
-
signing_key:
|
157
|
+
rubygems_version: 3.3.3
|
158
|
+
signing_key:
|
159
159
|
specification_version: 4
|
160
160
|
summary: Mocking and stubbing library
|
161
161
|
test_files: []
|