rspec-mocks 3.0.0 → 3.0.1

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,15 +1,7 @@
1
1
  ---
2
- !binary "U0hBMQ==":
3
- metadata.gz: !binary |-
4
- NGVjNjIxMDkzYzYzOGM1NTJlY2NlNmU4NDU4MzFiMDg5ZDkwODRmZA==
5
- data.tar.gz: !binary |-
6
- MmY5NWExM2FkYmFlNWQxOWU3ZmZiZjQzYmY2ZTI1MjRmNjNlYWZhMA==
7
- !binary "U0hBNTEy":
8
- metadata.gz: !binary |-
9
- MzhiNTZkYzg1ZjZhN2Y2NGU3ZTRkOGQwNWNiZmUzNzc0NzEyODZmN2UxMjY5
10
- NmYwODNhZGNiNGZmNWM5YzBkYzY5NDU4YWRiZTFhODhiNTVmMTVjNjNjNDA4
11
- ODVjZjRjNTQzNGUwOWM1Y2NiMTY1MDdjYWUxMmNmMDc3NWQwZmI=
12
- data.tar.gz: !binary |-
13
- NDQ0MDBhZDE0NzkyNzRjODFjNmZiOWExNzU3NWJmZjU4ZTFhMzAyYzlkNTk0
14
- ZDIxNjZhODk0ODI2MjY1OTFkNTljYTk0N2ZkMDBhNTcwNTk5MTc1Yzg1MDhj
15
- ZTczN2Q2M2I3YjgxNTg4YzhiM2FmMzliZGNiM2MxNTE4OTJhYjE=
2
+ SHA1:
3
+ metadata.gz: 9c8e75bed0a7161714dd94c0b57f20dc5ba9a66e
4
+ data.tar.gz: 81b87208da7820952c059230b059f95607755fcc
5
+ SHA512:
6
+ metadata.gz: 8092e85f567a248612be5fab6b6c37ecaed74f152ac43f90e0b8ee35fb417a559da2c31de5fe0b7e0679ff6879531ba8298fab92e07eacf57fa16e0d2de71483
7
+ data.tar.gz: 211a7d27ea79fe0e443f18c99bf9574ad1549e721a12091e93e76711a7333d43891e0a882e4750414e1d04a10c082776e21902089e6929c060833583be8489a5
Binary file
data.tar.gz.sig CHANGED
Binary file
@@ -1,3 +1,14 @@
1
+ ### 3.0.1 /2014-06-07
2
+ [Full Changelog](http://github.com/rspec/rspec-mocks/compare/v3.0.0...v3.0.1)
3
+
4
+ Bug Fixes:
5
+
6
+ * Fix `receive_message_chain(...)` so that it supports `with` just like
7
+ `stub_chain` did. (Jon Rowe, #697)
8
+ * Fix regression in `expect_any_instance_of` so that it expects the
9
+ message on _any_ instance rather than on _every_ instance.
10
+ (Myron Marston, #699)
11
+
1
12
  ### 3.0.0 / 2014-06-01
2
13
  [Full Changelog](http://github.com/rspec/rspec-mocks/compare/v3.0.0.rc1...v3.0.0)
3
14
 
data/README.md CHANGED
@@ -334,7 +334,7 @@ Instead of `before(:context)`, use `before(:example)`.
334
334
 
335
335
  rspec-mocks provides two methods, `allow_any_instance_of` and
336
336
  `expect_any_instance_of`, that will allow you to stub or mock any instance
337
- of a class. They are used in place for `allow` or `expect`:
337
+ of a class. They are used in place of `allow` or `expect`:
338
338
 
339
339
  ```ruby
340
340
  allow_any_instance_of(Widget).to receive(:name).and_return("Wibble")
@@ -351,8 +351,8 @@ general we discourage its use for a number of reasons:
351
351
  feature operates on entire classes of objects. As a result there are some
352
352
  sematically confusing edge cases. For example in
353
353
  `expect_any_instance_of(Widget).to receive(:name).twice` it isn't clear
354
- whether each specific instance is allowed to receive `name` twice, or if two
355
- receives total are allowed. (It's the former.)
354
+ whether each specific instance is expected to receive `name` twice, or if two
355
+ receives total are expected. (It's the former.)
356
356
  * Using this feature is often a design smell. It may be
357
357
  that your test is trying to do too much or that the object under test is too
358
358
  complex.
@@ -60,7 +60,11 @@ module RSpec
60
60
 
61
61
  def should_receive(method_name, &block)
62
62
  perform_proxying(__method__, [method_name], block) do |proxy|
63
- proxy.add_message_expectation(method_name, &block)
63
+ # Yeah, this is a bit odd...but if we used `add_message_expectation`
64
+ # then it would act like `expect_every_instance_of(klass).to receive`.
65
+ # The any_instance recorder takes care of validating that an instance
66
+ # received the message.
67
+ proxy.add_stub(method_name, &block)
64
68
  end
65
69
  end
66
70
 
@@ -256,7 +256,7 @@ module RSpec
256
256
  # use of `receive_message_chain` a code smell. Even though not all code smells
257
257
  # indicate real problems (think fluent interfaces), `receive_message_chain` still
258
258
  # results in brittle examples. For example, if you write
259
- # `foo.receive_message_chain(:bar, :baz => 37)` in a spec and then the
259
+ # `allow(foo).to receive_message_chain(:bar, :baz => 37)` in a spec and then the
260
260
  # implementation calls `foo.baz.bar`, the stub will not work.
261
261
  #
262
262
  # @example
@@ -11,7 +11,7 @@ module RSpec
11
11
  @recorded_customizations = []
12
12
  end
13
13
 
14
- [:and_return, :and_throw, :and_raise, :and_yield, :and_call_original].each do |msg|
14
+ [:with, :and_return, :and_throw, :and_raise, :and_yield, :and_call_original].each do |msg|
15
15
  define_method(msg) do |*args, &block|
16
16
  @recorded_customizations << ExpectationCustomization.new(msg, args, block)
17
17
  self
@@ -3,7 +3,7 @@ module RSpec
3
3
  # Version information for RSpec mocks.
4
4
  module Version
5
5
  # Version of RSpec mocks currently in use in SemVer format.
6
- STRING = '3.0.0'
6
+ STRING = '3.0.1'
7
7
  end
8
8
  end
9
9
  end
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: 3.0.0
4
+ version: 3.0.1
5
5
  platform: ruby
6
6
  authors:
7
7
  - Steven Baker
@@ -10,100 +10,112 @@ authors:
10
10
  autorequire:
11
11
  bindir: bin
12
12
  cert_chain:
13
- - !binary |-
14
- LS0tLS1CRUdJTiBDRVJUSUZJQ0FURS0tLS0tCk1JSURqakNDQW5hZ0F3SUJB
15
- Z0lCQVRBTkJna3Foa2lHOXcwQkFRVUZBREJHTVJJd0VBWURWUVFEREFseWMz
16
- QmwKWXkxa1pYWXhHekFaQmdvSmtpYUprL0lzWkFFWkZndG5iMjluYkdWbmIz
17
- VndjekVUTUJFR0NnbVNKb21UOGl4awpBUmtXQTJOdmJUQWVGdzB4TXpFeE1E
18
- Y3hPVFF5TlRsYUZ3MHhOREV4TURjeE9UUXlOVGxhTUVZe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ONNVdLOiy0bMynvcM7hoVQ2AomwGs+cEOWQ/4dkD
23
+ JcNV3qfzF5QBcTD2372XNM53b25nYVQSX2KH5FF7BhlKyov33bOm2gA9M+mWIujW
24
+ qgkyxVlfrlE+ZBgV3wXn1Cojg1LpTq35yOArgwioyrwwlZZJR9joN9s/nDklfr5A
25
+ +dyETjFc6cmEPWZrt2cJBQIDAQABo4GGMIGDMAkGA1UdEwQCMAAwCwYDVR0PBAQD
26
+ AgSwMB0GA1UdDgQWBBSW+WD7hn1swJ1A7i8tbuFeuNCJCjAkBgNVHREEHTAbgRly
27
+ c3BlYy1kZXZAZ29vZ2xlZ291cHMuY29tMCQGA1UdEgQdMBuBGXJzcGVjLWRldkBn
28
+ b29nbGVnb3Vwcy5jb20wDQYJKoZIhvcNAQEFBQADggEBAH27jAZ8sD7vnXupj6Y+
29
+ BaBdfHtCkFaslLJ0aKuMDIVXwYuKfqoW15cZPDLmSIEBuQFM3lw6d/hEEL4Uo2jZ
30
+ FvtmH5OxifPDzFyUtCL4yp6qgNe/Xf6sDsRg6FmKcpgqCwNOmsViaf0LPSUH/GYQ
31
+ 3Teoz8QCaDbD7AKsffT7eDrnbHnKweO1XdemRJC98u/yYxnGzMSWKEsn09etBlZ9
32
+ 7H67k5Z3uf6cfLZgToWL6zShzZY3Nun5r73YsNf2/QZOe4UZe4vfGvn6baw53ys9
33
+ 1yHC1AcSYpvi2dAbOiHT5iQF+krm4wse8KctXgTNnjMsHEoGKulJS2/sZl90jcCz
34
+ muA=
35
+ -----END CERTIFICATE-----
36
+ date: 2014-06-07 00:00:00.000000000 Z
44
37
  dependencies:
45
38
  - !ruby/object:Gem::Dependency
46
39
  name: rspec-support
47
40
  requirement: !ruby/object:Gem::Requirement
48
41
  requirements:
49
- - - ~>
42
+ - - "~>"
50
43
  - !ruby/object:Gem::Version
51
44
  version: 3.0.0
52
45
  type: :runtime
53
46
  prerelease: false
54
47
  version_requirements: !ruby/object:Gem::Requirement
55
48
  requirements:
56
- - - ~>
49
+ - - "~>"
57
50
  - !ruby/object:Gem::Version
58
51
  version: 3.0.0
59
52
  - !ruby/object:Gem::Dependency
60
53
  name: rake
61
54
  requirement: !ruby/object:Gem::Requirement
62
55
  requirements:
63
- - - ~>
56
+ - - "~>"
64
57
  - !ruby/object:Gem::Version
65
58
  version: 10.0.0
66
59
  type: :development
67
60
  prerelease: false
68
61
  version_requirements: !ruby/object:Gem::Requirement
69
62
  requirements:
70
- - - ~>
63
+ - - "~>"
71
64
  - !ruby/object:Gem::Version
72
65
  version: 10.0.0
73
66
  - !ruby/object:Gem::Dependency
74
67
  name: cucumber
75
68
  requirement: !ruby/object:Gem::Requirement
76
69
  requirements:
77
- - - ~>
70
+ - - "~>"
78
71
  - !ruby/object:Gem::Version
79
- version: 1.1.9
72
+ version: 1.3.15
80
73
  type: :development
81
74
  prerelease: false
82
75
  version_requirements: !ruby/object:Gem::Requirement
83
76
  requirements:
84
- - - ~>
77
+ - - "~>"
85
78
  - !ruby/object:Gem::Version
86
- version: 1.1.9
79
+ version: 1.3.15
87
80
  - !ruby/object:Gem::Dependency
88
81
  name: aruba
89
82
  requirement: !ruby/object:Gem::Requirement
90
83
  requirements:
91
- - - ~>
84
+ - - "~>"
92
85
  - !ruby/object:Gem::Version
93
86
  version: '0.5'
94
87
  type: :development
95
88
  prerelease: false
96
89
  version_requirements: !ruby/object:Gem::Requirement
97
90
  requirements:
98
- - - ~>
91
+ - - "~>"
99
92
  - !ruby/object:Gem::Version
100
93
  version: '0.5'
94
+ - !ruby/object:Gem::Dependency
95
+ name: minitest
96
+ requirement: !ruby/object:Gem::Requirement
97
+ requirements:
98
+ - - "~>"
99
+ - !ruby/object:Gem::Version
100
+ version: '5.2'
101
+ type: :development
102
+ prerelease: false
103
+ version_requirements: !ruby/object:Gem::Requirement
104
+ requirements:
105
+ - - "~>"
106
+ - !ruby/object:Gem::Version
107
+ version: '5.2'
101
108
  description: RSpec's 'test double' framework, with support for stubbing and mocking
102
109
  email: rspec@googlegroups.com
103
110
  executables: []
104
111
  extensions: []
105
112
  extra_rdoc_files: []
106
113
  files:
114
+ - ".document"
115
+ - ".yardopts"
116
+ - Changelog.md
117
+ - License.txt
118
+ - README.md
107
119
  - lib/rspec/mocks.rb
108
120
  - lib/rspec/mocks/any_instance.rb
109
121
  - lib/rspec/mocks/any_instance/chain.rb
@@ -143,35 +155,30 @@ files:
143
155
  - lib/rspec/mocks/verifying_message_expecation.rb
144
156
  - lib/rspec/mocks/verifying_proxy.rb
145
157
  - lib/rspec/mocks/version.rb
146
- - README.md
147
- - License.txt
148
- - Changelog.md
149
- - .yardopts
150
- - .document
151
158
  homepage: http://github.com/rspec/rspec-mocks
152
159
  licenses:
153
160
  - MIT
154
161
  metadata: {}
155
162
  post_install_message:
156
163
  rdoc_options:
157
- - --charset=UTF-8
164
+ - "--charset=UTF-8"
158
165
  require_paths:
159
166
  - lib
160
167
  required_ruby_version: !ruby/object:Gem::Requirement
161
168
  requirements:
162
- - - ! '>='
169
+ - - ">="
163
170
  - !ruby/object:Gem::Version
164
171
  version: 1.8.7
165
172
  required_rubygems_version: !ruby/object:Gem::Requirement
166
173
  requirements:
167
- - - ! '>='
174
+ - - ">="
168
175
  - !ruby/object:Gem::Version
169
176
  version: '0'
170
177
  requirements: []
171
178
  rubyforge_project: rspec
172
- rubygems_version: 2.0.7
179
+ rubygems_version: 2.2.2
173
180
  signing_key:
174
181
  specification_version: 4
175
- summary: rspec-mocks-3.0.0
182
+ summary: rspec-mocks-3.0.1
176
183
  test_files: []
177
184
  has_rdoc:
metadata.gz.sig CHANGED
Binary file