rspec-mocks 2.99.1 → 2.99.2

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 CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: ba3f7ae05cd249fe669c8ba174e5da668a00fa7a
4
- data.tar.gz: 8651cbb9a5cd0497cdd078a6ceec8af6cfeae9ed
3
+ metadata.gz: d1af49965a5c6d2286b6fda243d7b3a509da5fcd
4
+ data.tar.gz: d17b57235eee4d62ee17c5152f1398f68e0a6890
5
5
  SHA512:
6
- metadata.gz: a338aa245cd847028627c9e27b97f651d0c8b207afc3dadf78557e40fbd1be34cc526b064fb0afc99f2d6751e0c18e3d2ab5329d7ec2849b34937c4cc3664b05
7
- data.tar.gz: 9acaee2478e39adfc18d84940674ae64b321cd01311ac4db90bcd6e3f8f2d17dc6085e26580c919e27ca648d96b0797a41dda952aac97585fb54170079313b03
6
+ metadata.gz: dfb8b04b091d883bd624058e475d9efeb92d528bec14069699a4af5916305f9d04d970a58d13bf1d6be342470ef84f92f81b0f47980abb7d035d78990a383f1f
7
+ data.tar.gz: f7ba1ce85e44a85ad5543f750bf1ab5df3b14665868f01dbfc41c7037da944d1c8e30a01ad01efc4711275d2010152c78bc72f7da4001a4814a6194201683373
@@ -1,3 +1,11 @@
1
+ ### 2.99.2 / 2014-07-21
2
+ [Full Changelog](http://github.com/rspec/rspec-mocks/compare/v2.99.1...v2.99.2)
3
+
4
+ Enhancements:
5
+
6
+ * Warn about upcoming change to `#===` matching and `DateTime#===` behaviour.
7
+ (Jon Rowe, #735)
8
+
1
9
  ### 2.99.1 / 2014-06-12
2
10
  [Full Changelog](http://github.com/rspec/rspec-mocks/compare/v2.99.0...v2.99.1)
3
11
 
@@ -109,6 +109,18 @@ module RSpec
109
109
  end
110
110
 
111
111
  def ==(expected)
112
+ if defined?(DateTime) && DateTime === expected
113
+ RSpec.warn_deprecation <<-WARN.gsub(/^\s*\|/,'')
114
+ |In RSpec 3.0.0 matchers use `#===` (the match operator) to perform
115
+ |comparision between expected and actual arguments. Due to strange
116
+ |behaviour with `DateTime#===` (which ignores the time of the object
117
+ |when performing a comparison) this may result in undesired
118
+ |behaviour. We recommend you switch to a `Date` or `Time` object
119
+ |instead.
120
+ |
121
+ |Called from: #{RSpec::CallerFilter.first_non_rspec_line}
122
+ WARN
123
+ end
112
124
  @given == expected
113
125
  end
114
126
  end
@@ -1,7 +1,7 @@
1
1
  module RSpec
2
2
  module Mocks
3
3
  module Version
4
- STRING = '2.99.1'
4
+ STRING = '2.99.2'
5
5
  end
6
6
  end
7
7
  end
@@ -28,6 +28,17 @@ module RSpec
28
28
  }.to raise_error(/received :foo with unexpected arguments/)
29
29
  end
30
30
 
31
+ it 'warns about the change to === in RSpec 3 when used with a DateTime' do
32
+ wrapped.to receive(:foo).with(DateTime.new(2014,1,1,1))
33
+ allow_deprecation
34
+ receiver.foo(DateTime.new(2014,1,1,1))
35
+
36
+ expect {
37
+ expect_warn_deprecation_with_call_site __FILE__, __LINE__ + 1
38
+ receiver.foo(DateTime.new(2014,1,1,2))
39
+ }.to raise_error(/received :foo with unexpected arguments/)
40
+ end
41
+
31
42
  it 'allows a `do...end` block implementation to be provided' do
32
43
  wrapped.to receive(:foo) do
33
44
  4
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: rspec-mocks
3
3
  version: !ruby/object:Gem::Version
4
- version: 2.99.1
4
+ version: 2.99.2
5
5
  platform: ruby
6
6
  authors:
7
7
  - Steven Baker
@@ -9,7 +9,7 @@ authors:
9
9
  autorequire:
10
10
  bindir: bin
11
11
  cert_chain: []
12
- date: 2014-06-12 00:00:00.000000000 Z
12
+ date: 2014-07-21 00:00:00.000000000 Z
13
13
  dependencies:
14
14
  - !ruby/object:Gem::Dependency
15
15
  name: rake
@@ -221,7 +221,7 @@ rubyforge_project: rspec
221
221
  rubygems_version: 2.2.2
222
222
  signing_key:
223
223
  specification_version: 4
224
- summary: rspec-mocks-2.99.1
224
+ summary: rspec-mocks-2.99.2
225
225
  test_files:
226
226
  - features/README.md
227
227
  - features/Scope.md