rspec-expectations 3.9.1 → 3.10.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 +62 -0
- data/README.md +4 -4
- data/lib/rspec/expectations/configuration.rb +15 -0
- data/lib/rspec/expectations/failure_aggregator.rb +23 -5
- data/lib/rspec/expectations/handler.rb +18 -6
- data/lib/rspec/expectations/version.rb +1 -1
- data/lib/rspec/matchers.rb +43 -40
- data/lib/rspec/matchers/built_in.rb +2 -1
- data/lib/rspec/matchers/built_in/be.rb +10 -107
- data/lib/rspec/matchers/built_in/be_within.rb +2 -2
- data/lib/rspec/matchers/built_in/count_expectation.rb +169 -0
- data/lib/rspec/matchers/built_in/has.rb +88 -24
- data/lib/rspec/matchers/built_in/include.rb +72 -15
- data/lib/rspec/matchers/built_in/raise_error.rb +42 -13
- data/lib/rspec/matchers/built_in/respond_to.rb +46 -45
- data/lib/rspec/matchers/built_in/yield.rb +6 -83
- data/lib/rspec/matchers/dsl.rb +8 -2
- data/lib/rspec/matchers/english_phrasing.rb +1 -1
- metadata +13 -12
- metadata.gz.sig +0 -0
data/lib/rspec/matchers/dsl.rb
CHANGED
@@ -1,3 +1,5 @@
|
|
1
|
+
RSpec::Support.require_rspec_support "with_keywords_when_needed"
|
2
|
+
|
1
3
|
module RSpec
|
2
4
|
module Matchers
|
3
5
|
# Defines the custom matcher DSL.
|
@@ -460,11 +462,12 @@ module RSpec
|
|
460
462
|
@chained_method_clauses = []
|
461
463
|
@block_arg = block_arg
|
462
464
|
|
463
|
-
class << self
|
465
|
+
klass = class << self
|
464
466
|
# See `Macros#define_user_override` above, for an explanation.
|
465
467
|
include(@user_method_defs = Module.new)
|
466
468
|
self
|
467
|
-
end
|
469
|
+
end
|
470
|
+
RSpec::Support::WithKeywordsWhenNeeded.class_exec(klass, *expected, &declarations)
|
468
471
|
end
|
469
472
|
|
470
473
|
# Provides the expected value. This will return an array if
|
@@ -528,6 +531,9 @@ module RSpec
|
|
528
531
|
super(method, *args, &block)
|
529
532
|
end
|
530
533
|
end
|
534
|
+
# The method_missing method should be refactored to pass kw args in RSpec 4
|
535
|
+
# then this can be removed
|
536
|
+
ruby2_keywords :method_missing if respond_to?(:ruby2_keywords, true)
|
531
537
|
end
|
532
538
|
end
|
533
539
|
end
|
@@ -24,7 +24,7 @@ module RSpec
|
|
24
24
|
# list([]) #=> ""
|
25
25
|
#
|
26
26
|
def self.list(obj)
|
27
|
-
return " #{RSpec::Support::ObjectFormatter.format(obj)}" if !obj || Struct === obj
|
27
|
+
return " #{RSpec::Support::ObjectFormatter.format(obj)}" if !obj || Struct === obj || Hash === obj
|
28
28
|
items = Array(obj).map { |w| RSpec::Support::ObjectFormatter.format(w) }
|
29
29
|
case items.length
|
30
30
|
when 0
|
metadata
CHANGED
@@ -1,13 +1,13 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: rspec-expectations
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 3.
|
4
|
+
version: 3.10.1
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Steven Baker
|
8
8
|
- David Chelimsky
|
9
9
|
- Myron Marston
|
10
|
-
autorequire:
|
10
|
+
autorequire:
|
11
11
|
bindir: bin
|
12
12
|
cert_chain:
|
13
13
|
- |
|
@@ -45,7 +45,7 @@ cert_chain:
|
|
45
45
|
ZsVDj6a7lH3cNqtWXZxrb2wO38qV5AkYj8SQK7Hj3/Yui9myUX3crr+PdetazSqQ
|
46
46
|
F3MdtaDehhjC
|
47
47
|
-----END CERTIFICATE-----
|
48
|
-
date: 2020-
|
48
|
+
date: 2020-12-27 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.10.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.10.0
|
64
64
|
- !ruby/object:Gem::Dependency
|
65
65
|
name: diff-lcs
|
66
66
|
requirement: !ruby/object:Gem::Requirement
|
@@ -127,14 +127,14 @@ dependencies:
|
|
127
127
|
name: rake
|
128
128
|
requirement: !ruby/object:Gem::Requirement
|
129
129
|
requirements:
|
130
|
-
- - "
|
130
|
+
- - ">"
|
131
131
|
- !ruby/object:Gem::Version
|
132
132
|
version: 10.0.0
|
133
133
|
type: :development
|
134
134
|
prerelease: false
|
135
135
|
version_requirements: !ruby/object:Gem::Requirement
|
136
136
|
requirements:
|
137
|
-
- - "
|
137
|
+
- - ">"
|
138
138
|
- !ruby/object:Gem::Version
|
139
139
|
version: 10.0.0
|
140
140
|
description: rspec-expectations provides a simple, readable API to express expected
|
@@ -172,6 +172,7 @@ files:
|
|
172
172
|
- lib/rspec/matchers/built_in/change.rb
|
173
173
|
- lib/rspec/matchers/built_in/compound.rb
|
174
174
|
- lib/rspec/matchers/built_in/contain_exactly.rb
|
175
|
+
- lib/rspec/matchers/built_in/count_expectation.rb
|
175
176
|
- lib/rspec/matchers/built_in/cover.rb
|
176
177
|
- lib/rspec/matchers/built_in/eq.rb
|
177
178
|
- lib/rspec/matchers/built_in/eql.rb
|
@@ -202,11 +203,11 @@ licenses:
|
|
202
203
|
- MIT
|
203
204
|
metadata:
|
204
205
|
bug_tracker_uri: https://github.com/rspec/rspec-expectations/issues
|
205
|
-
changelog_uri: https://github.com/rspec/rspec-expectations/blob/v3.
|
206
|
+
changelog_uri: https://github.com/rspec/rspec-expectations/blob/v3.10.1/Changelog.md
|
206
207
|
documentation_uri: https://rspec.info/documentation/
|
207
208
|
mailing_list_uri: https://groups.google.com/forum/#!forum/rspec
|
208
209
|
source_code_uri: https://github.com/rspec/rspec-expectations
|
209
|
-
post_install_message:
|
210
|
+
post_install_message:
|
210
211
|
rdoc_options:
|
211
212
|
- "--charset=UTF-8"
|
212
213
|
require_paths:
|
@@ -222,8 +223,8 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
222
223
|
- !ruby/object:Gem::Version
|
223
224
|
version: '0'
|
224
225
|
requirements: []
|
225
|
-
rubygems_version: 3.
|
226
|
-
signing_key:
|
226
|
+
rubygems_version: 3.2.3
|
227
|
+
signing_key:
|
227
228
|
specification_version: 4
|
228
|
-
summary: rspec-expectations-3.
|
229
|
+
summary: rspec-expectations-3.10.1
|
229
230
|
test_files: []
|
metadata.gz.sig
CHANGED
Binary file
|