rspec-mocks 3.4.0 → 3.4.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 +7 -0
- data/lib/rspec/mocks/any_instance/recorder.rb +7 -3
- data/lib/rspec/mocks/instance_method_stasher.rb +1 -0
- 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: d5ce50f9bdd93d8059872838e7c1e042cd456633
|
4
|
+
data.tar.gz: 2d50dc301a35c6f6ed05593c3da8461c987e3e7d
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 9db8f83c7c1422db6ec35b2a8503ffa44ff0f78892f9ea0b48ff75aed54ed0637965b25d421df0839c8f29ce54d15d45b6e56e6172dff6a66a0e65721891f755
|
7
|
+
data.tar.gz: 4fea4235e7df0352398356da94dbf6dedfc8abd6aa7db284ebb41cbdb7881067b8d2155ac7a3ccba5a5e5b47019e8c1450a0eab03f7538906b4c2bee2458dc72
|
checksums.yaml.gz.sig
CHANGED
Binary file
|
data.tar.gz.sig
CHANGED
Binary file
|
data/Changelog.md
CHANGED
@@ -1,3 +1,10 @@
|
|
1
|
+
### 3.4.1 / 2016-01-10
|
2
|
+
[Full Changelog](http://github.com/rspec/rspec-mocks/compare/v3.4.0...v3.4.1)
|
3
|
+
|
4
|
+
Bug Fixes:
|
5
|
+
|
6
|
+
* Fix `any_instance` to work properly on Ruby 2.3. (Joe Rafaniello, #1043)
|
7
|
+
|
1
8
|
### 3.4.0 / 2015-11-11
|
2
9
|
[Full Changelog](http://github.com/rspec/rspec-mocks/compare/v3.3.2...v3.4.0)
|
3
10
|
|
@@ -18,6 +18,7 @@ module RSpec
|
|
18
18
|
@stubs = Hash.new { |hash, key| hash[key] = [] }
|
19
19
|
@observed_methods = []
|
20
20
|
@played_methods = {}
|
21
|
+
@backed_up_method_owner = {}
|
21
22
|
@klass = klass
|
22
23
|
@expectation_set = false
|
23
24
|
end
|
@@ -190,9 +191,9 @@ module RSpec
|
|
190
191
|
return unless @klass.instance_method(method_name).owner == @klass
|
191
192
|
|
192
193
|
alias_method_name = build_alias_method_name(method_name)
|
193
|
-
@klass.class_exec do
|
194
|
+
@klass.class_exec(@backed_up_method_owner) do |backed_up_method_owner|
|
194
195
|
remove_method method_name
|
195
|
-
alias_method method_name, alias_method_name
|
196
|
+
alias_method method_name, alias_method_name if backed_up_method_owner[method_name.to_sym] == self
|
196
197
|
remove_method alias_method_name
|
197
198
|
end
|
198
199
|
end
|
@@ -204,10 +205,13 @@ module RSpec
|
|
204
205
|
end
|
205
206
|
|
206
207
|
def backup_method!(method_name)
|
208
|
+
return unless public_protected_or_private_method_defined?(method_name)
|
209
|
+
|
207
210
|
alias_method_name = build_alias_method_name(method_name)
|
211
|
+
@backed_up_method_owner[method_name.to_sym] ||= @klass.instance_method(method_name).owner
|
208
212
|
@klass.class_exec do
|
209
213
|
alias_method alias_method_name, method_name
|
210
|
-
end
|
214
|
+
end
|
211
215
|
end
|
212
216
|
|
213
217
|
def public_protected_or_private_method_defined?(method_name)
|
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.4.
|
4
|
+
version: 3.4.1
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Steven Baker
|
@@ -45,7 +45,7 @@ cert_chain:
|
|
45
45
|
ZsVDj6a7lH3cNqtWXZxrb2wO38qV5AkYj8SQK7Hj3/Yui9myUX3crr+PdetazSqQ
|
46
46
|
F3MdtaDehhjC
|
47
47
|
-----END CERTIFICATE-----
|
48
|
-
date:
|
48
|
+
date: 2016-01-10 00:00:00.000000000 Z
|
49
49
|
dependencies:
|
50
50
|
- !ruby/object:Gem::Dependency
|
51
51
|
name: rspec-support
|
@@ -212,6 +212,6 @@ rubyforge_project:
|
|
212
212
|
rubygems_version: 2.2.2
|
213
213
|
signing_key:
|
214
214
|
specification_version: 4
|
215
|
-
summary: rspec-mocks-3.4.
|
215
|
+
summary: rspec-mocks-3.4.1
|
216
216
|
test_files: []
|
217
217
|
has_rdoc:
|
metadata.gz.sig
CHANGED
Binary file
|