mocha 1.15.1 → 1.16.1

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 5f69e06715dfda038470d522472d10e99e4de02d57f1efe4d4f81caaff7856e4
4
- data.tar.gz: a1fae0b515f7f76108c58fc151995eaab5a03a3d034820e3853799c2f571bcda
3
+ metadata.gz: 4e91d0f079638506c5d57fc91f1d84f3232e9c9b923b4dcf173697ab564d72a9
4
+ data.tar.gz: 7522a45c0fe7808e89b68e9703959fa320c722bf6fa760091e8aae7f9f25237c
5
5
  SHA512:
6
- metadata.gz: 997c75e49d45c59eab07d55c940bf56bf94161a4b1940de46f70ab5d3c8749657de799d61ac519b85e89de9154618df5cd5d4eedcb7ab85499cf404eb5ad54f4
7
- data.tar.gz: 90122aa4932173fc3dfc2b7295f97af05f23abb0967fc46da3a7c977ec4b16371595f21b9eeae58c50024a57e20dd3861e91ab67a405a0b29d20267a46b8800e
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.15.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,c586a08c)
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
 
@@ -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 => true
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; enabled by default.
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
@@ -1,3 +1,3 @@
1
1
  module Mocha
2
- VERSION = '1.15.1'.freeze
2
+ VERSION = '1.16.1'.freeze
3
3
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: mocha
3
3
  version: !ruby/object:Gem::Version
4
- version: 1.15.1
4
+ version: 1.16.1
5
5
  platform: ruby
6
6
  authors:
7
7
  - James Mead