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 CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: 16d5f671e68051be014fb930e9980f5a0c19d5ee
4
- data.tar.gz: b035e939d0afc695e7b03485f1edc2356c5b0bc0
3
+ metadata.gz: f9d8779911a17ba0cd7be286a331dbce8a9eb16d
4
+ data.tar.gz: 95b80b746108385aa0dbcdb3e33bc1800c7acef4
5
5
  SHA512:
6
- metadata.gz: 46ba65b5222400961866c699044adba07374c0a2c241e2f011e2eb55b8fdfc3c167db0f371a925a06704ac6d209e1400a1802c45d94ea25ae38142bcf396c9bc
7
- data.tar.gz: 617ae574ebe247f7b2ee1c6a45a94fb200006b56dd8c98ec536d655622a85749e0a10985e491e47709a744ebc450d494d591b5367c91bd89cc3f0001e6f95c9b
6
+ metadata.gz: e0bd6fa86ce798e51d04e3930bea991d7d7f7641017aadd486e6c1d46cc88b365ea62c79b95d475202b227fbb24e05a977f80e61b2183ca4a40219568b144a88
7
+ data.tar.gz: 7c38636d51a47b79e4880edc845c4ec2c18294b39a1ec123d4bcad3b371ca52f3f1137f170f20dc1904c04ce35597650447f9168db886adf07444217b878492e
Binary file
data.tar.gz.sig CHANGED
Binary file
@@ -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.ancestors.take_while { |mod| !(Class === mod) }
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
 
@@ -205,17 +205,18 @@ module RSpec
205
205
  end
206
206
 
207
207
  if Support::RubyFeatures.module_prepends_supported?
208
- def prepended_modules_of_singleton_class
209
- @prepended_modules_of_singleton_class ||= begin
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
- # `|| 0` is necessary for Ruby 2.0, where the singleton class
214
- # is only in the ancestor list when there are prepended modules.
215
- singleton_index = ancestors.index(singleton_class) || 0
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
- ancestors[0, singleton_index]
218
- end
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
 
@@ -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.1.0'
6
+ STRING = '3.1.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.1.0
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-05 00:00:00.000000000 Z
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.0
182
+ summary: rspec-mocks-3.1.1
183
183
  test_files: []
184
184
  has_rdoc:
metadata.gz.sig CHANGED
Binary file