rspec-mocks 3.1.0 → 3.1.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
- checksums.yaml.gz.sig +0 -0
- data.tar.gz.sig +0 -0
- data/Changelog.md +8 -0
- data/lib/rspec/mocks/any_instance/recorder.rb +1 -1
- data/lib/rspec/mocks/proxy.rb +10 -9
- data/lib/rspec/mocks/version.rb +1 -1
- metadata +3 -3
- metadata.gz.sig +0 -0
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: f9d8779911a17ba0cd7be286a331dbce8a9eb16d
|
4
|
+
data.tar.gz: 95b80b746108385aa0dbcdb3e33bc1800c7acef4
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: e0bd6fa86ce798e51d04e3930bea991d7d7f7641017aadd486e6c1d46cc88b365ea62c79b95d475202b227fbb24e05a977f80e61b2183ca4a40219568b144a88
|
7
|
+
data.tar.gz: 7c38636d51a47b79e4880edc845c4ec2c18294b39a1ec123d4bcad3b371ca52f3f1137f170f20dc1904c04ce35597650447f9168db886adf07444217b878492e
|
checksums.yaml.gz.sig
CHANGED
Binary file
|
data.tar.gz.sig
CHANGED
Binary file
|
data/Changelog.md
CHANGED
@@ -1,3 +1,11 @@
|
|
1
|
+
### 3.1.1 / 2014-09-18
|
2
|
+
[Full Changelog](http://github.com/rspec/rspec-mocks/compare/v3.1.0...v3.1.1)
|
3
|
+
|
4
|
+
Bug Fixes:
|
5
|
+
|
6
|
+
* Prevent included modules being detected as prepended modules on Ruby 2.0
|
7
|
+
when using `any_instance_of(...)`. (Tony Novak, #781)
|
8
|
+
|
1
9
|
### 3.1.0 / 2014-09-04
|
2
10
|
[Full Changelog](http://github.com/rspec/rspec-mocks/compare/v3.0.4...v3.1.0)
|
3
11
|
|
@@ -248,7 +248,7 @@ module RSpec
|
|
248
248
|
|
249
249
|
if Support::RubyFeatures.module_prepends_supported?
|
250
250
|
def allow_no_prepended_module_definition_of(method_name)
|
251
|
-
prepended_modules = @klass
|
251
|
+
prepended_modules = RSpec::Mocks::Proxy.prepended_modules_of(@klass)
|
252
252
|
problem_mod = prepended_modules.find { |mod| mod.method_defined?(method_name) }
|
253
253
|
return unless problem_mod
|
254
254
|
|
data/lib/rspec/mocks/proxy.rb
CHANGED
@@ -205,17 +205,18 @@ module RSpec
|
|
205
205
|
end
|
206
206
|
|
207
207
|
if Support::RubyFeatures.module_prepends_supported?
|
208
|
-
def
|
209
|
-
|
210
|
-
singleton_class = @object.singleton_class
|
211
|
-
ancestors = singleton_class.ancestors
|
208
|
+
def self.prepended_modules_of(klass)
|
209
|
+
ancestors = klass.ancestors
|
212
210
|
|
213
|
-
|
214
|
-
|
215
|
-
|
211
|
+
# `|| 0` is necessary for Ruby 2.0, where the singleton class
|
212
|
+
# is only in the ancestor list when there are prepended modules.
|
213
|
+
singleton_index = ancestors.index(klass) || 0
|
216
214
|
|
217
|
-
|
218
|
-
|
215
|
+
ancestors[0, singleton_index]
|
216
|
+
end
|
217
|
+
|
218
|
+
def prepended_modules_of_singleton_class
|
219
|
+
@prepended_modules_of_singleton_class ||= RSpec::Mocks::Proxy.prepended_modules_of(@object.singleton_class)
|
219
220
|
end
|
220
221
|
end
|
221
222
|
|
data/lib/rspec/mocks/version.rb
CHANGED
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.1.
|
4
|
+
version: 3.1.1
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Steven Baker
|
@@ -33,7 +33,7 @@ cert_chain:
|
|
33
33
|
1yHC1AcSYpvi2dAbOiHT5iQF+krm4wse8KctXgTNnjMsHEoGKulJS2/sZl90jcCz
|
34
34
|
muA=
|
35
35
|
-----END CERTIFICATE-----
|
36
|
-
date: 2014-09-
|
36
|
+
date: 2014-09-18 00:00:00.000000000 Z
|
37
37
|
dependencies:
|
38
38
|
- !ruby/object:Gem::Dependency
|
39
39
|
name: rspec-support
|
@@ -179,6 +179,6 @@ rubyforge_project: rspec
|
|
179
179
|
rubygems_version: 2.2.2
|
180
180
|
signing_key:
|
181
181
|
specification_version: 4
|
182
|
-
summary: rspec-mocks-3.1.
|
182
|
+
summary: rspec-mocks-3.1.1
|
183
183
|
test_files: []
|
184
184
|
has_rdoc:
|
metadata.gz.sig
CHANGED
Binary file
|