mocha 1.15.1 → 1.16.1
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.
- checksums.yaml +4 -4
- data/RELEASE.md +13 -2
- data/lib/mocha/configuration.rb +13 -2
- data/lib/mocha/version.rb +1 -1
- metadata +1 -1
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 4e91d0f079638506c5d57fc91f1d84f3232e9c9b923b4dcf173697ab564d72a9
|
4
|
+
data.tar.gz: 7522a45c0fe7808e89b68e9703959fa320c722bf6fa760091e8aae7f9f25237c
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 4ac64c4e5ab1ffca88e410601a3f10e4dda4fde0cb2e00b6975280dcd9410f16918f249d6b98926cfc18956a165ef1e24d0d719d093ff29c9663bdfadb8b6457
|
7
|
+
data.tar.gz: 4eb4166b55e1bb8ee63e8848db0f64d6368abe6ae03897aa680143e6a046202ec5420cbf2a2d01f2f4d0c893210dccf7277627ce81f3db523fd76c1de4618926
|
data/RELEASE.md
CHANGED
@@ -1,10 +1,21 @@
|
|
1
1
|
# Release Notes
|
2
2
|
|
3
|
-
## 1.
|
3
|
+
## 1.16.1
|
4
4
|
|
5
5
|
### External changes
|
6
6
|
|
7
|
-
* Fix regression in `Mock#responds_like` behaviour - thanks to @adrianna-chang-shopify for reporting (#580,#583,
|
7
|
+
* Fix regression in `Mock#responds_like` behaviour - thanks to @adrianna-chang-shopify for reporting (#580,#583,77af2af1)
|
8
|
+
|
9
|
+
## 1.16.0
|
10
|
+
|
11
|
+
### External changes
|
12
|
+
|
13
|
+
* Default `Configuration#reinstate_undocumented_behaviour_from_v1_9=` to `false` (6fcaf947)
|
14
|
+
* Deprecate `Configuration#reinstate_undocumented_behaviour_from_v1_9=` (a797c5fd)
|
15
|
+
|
16
|
+
### Internal changes
|
17
|
+
|
18
|
+
* Remove redundant deprecation disabling in MockTest (dc8ca969)
|
8
19
|
|
9
20
|
## 1.15.0
|
10
21
|
|
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