rspec-mocks 3.6.0 → 3.7.0
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 +16 -0
- data/README.md +1 -1
- data/lib/rspec/mocks/argument_matchers.rb +1 -1
- data/lib/rspec/mocks/error_generator.rb +7 -7
- 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: 0f8fec0ae9f2fb0cfdc2ea8486e52a4567c33df9
|
4
|
+
data.tar.gz: 386582896ee1a855780485f3df9e9331a3a76446
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: aeac6c1f78a6da17aa0a7fc93b05c6812ba721eb2e51a9bae9b95c7ebdcb626fe1e4bb54cb80755514db5cee2e73c3d2de606456d9f80e1143f4c99c881260ff
|
7
|
+
data.tar.gz: 5df3cf35c18e6c9b0cccf941102593761feb59ef8b1d83a8508d4c8abfa64ce7bd73a8661959a35502bbe9f981692980a66292624e5ec8355421e5c80b086a11
|
checksums.yaml.gz.sig
CHANGED
Binary file
|
data.tar.gz.sig
CHANGED
Binary file
|
data/Changelog.md
CHANGED
@@ -1,3 +1,19 @@
|
|
1
|
+
### 3.8 Development
|
2
|
+
[Full Changelog](http://github.com/rspec/rspec-mocks/compare/v3.7.0...master)
|
3
|
+
|
4
|
+
### 3.7.0 / 2017-10-17
|
5
|
+
[Full Changelog](http://github.com/rspec/rspec-mocks/compare/v3.6.0...v3.7.0)
|
6
|
+
|
7
|
+
Enhancements:
|
8
|
+
|
9
|
+
* Improve compatibility with `--enable-frozen-string-literal` option
|
10
|
+
on Ruby 2.3+. (Pat Allan, #1165)
|
11
|
+
|
12
|
+
Bug Fixes:
|
13
|
+
|
14
|
+
* Fix `hash_including` and `hash_excluding` so that they work against
|
15
|
+
subclasses of `Hash`. (Aaron Rosenberg, #1167)
|
16
|
+
|
1
17
|
### 3.6.0 / 2017-05-04
|
2
18
|
[Full Changelog](http://github.com/rspec/rspec-mocks/compare/v3.6.0.beta2...v3.6.0)
|
3
19
|
|
data/README.md
CHANGED
@@ -257,7 +257,7 @@ expect(double).to receive(:msg).with("B", 2, 4)
|
|
257
257
|
## Argument Matchers
|
258
258
|
|
259
259
|
Arguments that are passed to `with` are compared with actual arguments
|
260
|
-
received using
|
260
|
+
received using ===. In cases in which you want to specify things about the
|
261
261
|
arguments rather than the arguments themselves, you can use any of the
|
262
262
|
matchers that ship with rspec-expectations. They don't all make syntactic
|
263
263
|
sense (they were primarily designed for use with RSpec::Expectations), but
|
@@ -116,7 +116,7 @@ module RSpec
|
|
116
116
|
|
117
117
|
# @private
|
118
118
|
def self.anythingize_lonely_keys(*args)
|
119
|
-
hash = args.last
|
119
|
+
hash = Hash === args.last ? args.delete_at(-1) : {}
|
120
120
|
args.each { | arg | hash[arg] = AnyArgMatcher::INSTANCE }
|
121
121
|
hash
|
122
122
|
end
|
@@ -57,10 +57,10 @@ module RSpec
|
|
57
57
|
|
58
58
|
# @private
|
59
59
|
def raise_missing_default_stub_error(expectation, args_for_multiple_calls)
|
60
|
-
|
61
|
-
|
62
|
-
|
63
|
-
|
60
|
+
__raise(
|
61
|
+
error_message(expectation, args_for_multiple_calls) +
|
62
|
+
"\n Please stub a default value first if message might be received with other args as well. \n"
|
63
|
+
)
|
64
64
|
end
|
65
65
|
|
66
66
|
# @private
|
@@ -69,7 +69,7 @@ module RSpec
|
|
69
69
|
end
|
70
70
|
|
71
71
|
def default_error_message(expectation, expected_args, actual_args)
|
72
|
-
"#{intro} received #{expectation.message.inspect} #{unexpected_arguments_message(expected_args, actual_args)}"
|
72
|
+
"#{intro} received #{expectation.message.inspect} #{unexpected_arguments_message(expected_args, actual_args)}".dup
|
73
73
|
end
|
74
74
|
|
75
75
|
# rubocop:disable Style/ParameterLists
|
@@ -87,14 +87,14 @@ module RSpec
|
|
87
87
|
def raise_unimplemented_error(doubled_module, method_name, object)
|
88
88
|
message = case object
|
89
89
|
when InstanceVerifyingDouble
|
90
|
-
"the %s class does not implement the instance method: %s" <<
|
90
|
+
"the %s class does not implement the instance method: %s".dup <<
|
91
91
|
if ObjectMethodReference.for(doubled_module, method_name).implemented?
|
92
92
|
". Perhaps you meant to use `class_double` instead?"
|
93
93
|
else
|
94
94
|
""
|
95
95
|
end
|
96
96
|
when ClassVerifyingDouble
|
97
|
-
"the %s class does not implement the class method: %s" <<
|
97
|
+
"the %s class does not implement the class method: %s".dup <<
|
98
98
|
if InstanceMethodReference.for(doubled_module, method_name).implemented?
|
99
99
|
". Perhaps you meant to use `instance_double` instead?"
|
100
100
|
else
|
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
|
+
version: 3.7.0
|
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: 2017-
|
48
|
+
date: 2017-10-17 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.
|
56
|
+
version: 3.7.0
|
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.
|
63
|
+
version: 3.7.0
|
64
64
|
- !ruby/object:Gem::Dependency
|
65
65
|
name: diff-lcs
|
66
66
|
requirement: !ruby/object:Gem::Requirement
|
@@ -210,9 +210,9 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
210
210
|
version: '0'
|
211
211
|
requirements: []
|
212
212
|
rubyforge_project:
|
213
|
-
rubygems_version: 2.
|
213
|
+
rubygems_version: 2.6.14
|
214
214
|
signing_key:
|
215
215
|
specification_version: 4
|
216
|
-
summary: rspec-mocks-3.
|
216
|
+
summary: rspec-mocks-3.7.0
|
217
217
|
test_files: []
|
218
218
|
has_rdoc:
|
metadata.gz.sig
CHANGED
Binary file
|