rspec-mocks 3.5.0.beta1 → 3.5.0.beta2
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- checksums.yaml.gz.sig +0 -0
- data.tar.gz.sig +0 -0
- data/Changelog.md +12 -0
- data/lib/rspec/mocks/any_instance/stub_chain_chain.rb +1 -0
- data/lib/rspec/mocks/message_expectation.rb +14 -10
- data/lib/rspec/mocks/version.rb +1 -1
- metadata +6 -6
- 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: 04c6f5ba70d371c519038204d10781a53a3c6f70
|
4
|
+
data.tar.gz: 621501f526471f9156e29b0a74a78b42779b5b10
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 08c1dff465c3965b39ac0cac32171dc5706657ab792d84083de15d49487159be7c8b00ba2825009a673351e0e6506903748c3569aa2cc39f9eba47bf1c37874e
|
7
|
+
data.tar.gz: 0bec2879051701ddaa9d971ac3e56e1ec3456a69cbffd55c120e587d1507748d7ab292db3f768b7758f47359ef759f80b683e70c73c6b0efc5d11e11693b27ba
|
checksums.yaml.gz.sig
CHANGED
Binary file
|
data.tar.gz.sig
CHANGED
Binary file
|
data/Changelog.md
CHANGED
@@ -1,6 +1,16 @@
|
|
1
1
|
### Development
|
2
2
|
[Full Changelog](http://github.com/rspec/rspec-mocks/compare/v3.5.0.beta1...master)
|
3
3
|
|
4
|
+
Enhancements:
|
5
|
+
|
6
|
+
* Improve error message displayed when using `and_wrap_original` on pure test
|
7
|
+
doubles. (betesh, #1063)
|
8
|
+
|
9
|
+
Bug Fixes:
|
10
|
+
|
11
|
+
* Fix issue that prevented `receive_message_chain(...).with(...)` working
|
12
|
+
correctly on "any instance" mocks. (Jon Rowe, #1061)
|
13
|
+
|
4
14
|
### 3.5.0.beta1 / 2016-02-06
|
5
15
|
[Full Changelog](http://github.com/rspec/rspec-mocks/compare/v3.4.1...v3.5.0.beta1)
|
6
16
|
|
@@ -12,6 +22,8 @@ Bug Fixes:
|
|
12
22
|
`allow`. (Andrew Kozin, #1056)
|
13
23
|
* Prevent stubbing `respond_to?` on partial doubles from causing infinite
|
14
24
|
recursion. (Jon Rowe, #1013)
|
25
|
+
* Prevent aliased methods from disapearing after being mocked with
|
26
|
+
`any_instance` (regression from #1043). (Joe Rafaniello, #1060)
|
15
27
|
|
16
28
|
### 3.4.1 / 2016-01-10
|
17
29
|
[Full Changelog](http://github.com/rspec/rspec-mocks/compare/v3.4.0...v3.4.1)
|
@@ -95,7 +95,7 @@ module RSpec
|
|
95
95
|
# counter.increment
|
96
96
|
# expect(counter.count).to eq(original_count + 1)
|
97
97
|
def and_call_original
|
98
|
-
|
98
|
+
wrap_original(__method__) do |original, *args, &block|
|
99
99
|
original.call(*args, &block)
|
100
100
|
end
|
101
101
|
end
|
@@ -113,15 +113,7 @@ module RSpec
|
|
113
113
|
# original_method.call(*args, &block).first(10)
|
114
114
|
# end
|
115
115
|
def and_wrap_original(&block)
|
116
|
-
|
117
|
-
@error_generator.raise_only_valid_on_a_partial_double(:and_call_original)
|
118
|
-
else
|
119
|
-
warn_about_stub_override if implementation.inner_action
|
120
|
-
@implementation = AndWrapOriginalImplementation.new(@method_double.original_implementation_callable, block)
|
121
|
-
@yield_receiver_to_implementation_block = false
|
122
|
-
end
|
123
|
-
|
124
|
-
nil
|
116
|
+
wrap_original(__method__, &block)
|
125
117
|
end
|
126
118
|
|
127
119
|
# @overload and_raise
|
@@ -601,6 +593,18 @@ module RSpec
|
|
601
593
|
"Called from #{CallerFilter.first_non_rspec_line}."
|
602
594
|
)
|
603
595
|
end
|
596
|
+
|
597
|
+
def wrap_original(method_name, &block)
|
598
|
+
if RSpec::Mocks::TestDouble === @method_double.object
|
599
|
+
@error_generator.raise_only_valid_on_a_partial_double(method_name)
|
600
|
+
else
|
601
|
+
warn_about_stub_override if implementation.inner_action
|
602
|
+
@implementation = AndWrapOriginalImplementation.new(@method_double.original_implementation_callable, block)
|
603
|
+
@yield_receiver_to_implementation_block = false
|
604
|
+
end
|
605
|
+
|
606
|
+
nil
|
607
|
+
end
|
604
608
|
end
|
605
609
|
|
606
610
|
include ImplementationDetails
|
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.5.0.
|
4
|
+
version: 3.5.0.beta2
|
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: 2016-
|
48
|
+
date: 2016-03-10 00:00:00.000000000 Z
|
49
49
|
dependencies:
|
50
50
|
- !ruby/object:Gem::Dependency
|
51
51
|
name: rspec-support
|
@@ -53,14 +53,14 @@ dependencies:
|
|
53
53
|
requirements:
|
54
54
|
- - '='
|
55
55
|
- !ruby/object:Gem::Version
|
56
|
-
version: 3.5.0.
|
56
|
+
version: 3.5.0.beta2
|
57
57
|
type: :runtime
|
58
58
|
prerelease: false
|
59
59
|
version_requirements: !ruby/object:Gem::Requirement
|
60
60
|
requirements:
|
61
61
|
- - '='
|
62
62
|
- !ruby/object:Gem::Version
|
63
|
-
version: 3.5.0.
|
63
|
+
version: 3.5.0.beta2
|
64
64
|
- !ruby/object:Gem::Dependency
|
65
65
|
name: diff-lcs
|
66
66
|
requirement: !ruby/object:Gem::Requirement
|
@@ -209,9 +209,9 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
209
209
|
version: 1.3.1
|
210
210
|
requirements: []
|
211
211
|
rubyforge_project:
|
212
|
-
rubygems_version: 2.
|
212
|
+
rubygems_version: 2.5.1
|
213
213
|
signing_key:
|
214
214
|
specification_version: 4
|
215
|
-
summary: rspec-mocks-3.5.0.
|
215
|
+
summary: rspec-mocks-3.5.0.beta2
|
216
216
|
test_files: []
|
217
217
|
has_rdoc:
|
metadata.gz.sig
CHANGED
Binary file
|