rspec-expectations 2.14.0 → 3.13.0
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 +7 -0
- checksums.yaml.gz.sig +0 -0
- data/.document +1 -1
- data/.yardopts +1 -1
- data/Changelog.md +976 -25
- data/{License.txt → LICENSE.md} +5 -3
- data/README.md +162 -26
- data/lib/rspec/expectations/block_snippet_extractor.rb +253 -0
- data/lib/rspec/expectations/configuration.rb +230 -0
- data/lib/rspec/expectations/expectation_target.rb +127 -51
- data/lib/rspec/expectations/fail_with.rb +17 -57
- data/lib/rspec/expectations/failure_aggregator.rb +229 -0
- data/lib/rspec/expectations/handler.rb +146 -32
- data/lib/rspec/expectations/minitest_integration.rb +58 -0
- data/lib/rspec/expectations/syntax.rb +68 -100
- data/lib/rspec/expectations/version.rb +1 -1
- data/lib/rspec/expectations.rb +58 -23
- data/lib/rspec/matchers/aliased_matcher.rb +116 -0
- data/lib/rspec/matchers/built_in/all.rb +86 -0
- data/lib/rspec/matchers/built_in/base_matcher.rb +191 -20
- data/lib/rspec/matchers/built_in/be.rb +114 -114
- data/lib/rspec/matchers/built_in/be_between.rb +77 -0
- data/lib/rspec/matchers/built_in/be_instance_of.rb +15 -4
- data/lib/rspec/matchers/built_in/be_kind_of.rb +10 -1
- data/lib/rspec/matchers/built_in/be_within.rb +35 -18
- data/lib/rspec/matchers/built_in/change.rb +389 -80
- data/lib/rspec/matchers/built_in/compound.rb +290 -0
- data/lib/rspec/matchers/built_in/contain_exactly.rb +310 -0
- data/lib/rspec/matchers/built_in/count_expectation.rb +169 -0
- data/lib/rspec/matchers/built_in/cover.rb +3 -0
- data/lib/rspec/matchers/built_in/eq.rb +30 -8
- data/lib/rspec/matchers/built_in/eql.rb +23 -8
- data/lib/rspec/matchers/built_in/equal.rb +55 -22
- data/lib/rspec/matchers/built_in/exist.rb +74 -10
- data/lib/rspec/matchers/built_in/has.rb +141 -22
- data/lib/rspec/matchers/built_in/have_attributes.rb +114 -0
- data/lib/rspec/matchers/built_in/include.rb +184 -32
- data/lib/rspec/matchers/built_in/match.rb +95 -1
- data/lib/rspec/matchers/built_in/operators.rb +128 -0
- data/lib/rspec/matchers/built_in/output.rb +207 -0
- data/lib/rspec/matchers/built_in/raise_error.rb +192 -44
- data/lib/rspec/matchers/built_in/respond_to.rb +154 -28
- data/lib/rspec/matchers/built_in/satisfy.rb +39 -9
- data/lib/rspec/matchers/built_in/start_or_end_with.rb +94 -0
- data/lib/rspec/matchers/built_in/throw_symbol.rb +58 -14
- data/lib/rspec/matchers/built_in/yield.rb +240 -161
- data/lib/rspec/matchers/built_in.rb +47 -33
- data/lib/rspec/matchers/composable.rb +171 -0
- data/lib/rspec/matchers/dsl.rb +531 -10
- data/lib/rspec/matchers/english_phrasing.rb +58 -0
- data/lib/rspec/matchers/fail_matchers.rb +42 -0
- data/lib/rspec/matchers/generated_descriptions.rb +14 -8
- data/lib/rspec/matchers/matcher_delegator.rb +61 -0
- data/lib/rspec/matchers/matcher_protocol.rb +105 -0
- data/lib/rspec/matchers/multi_matcher_diff.rb +82 -0
- data/lib/rspec/matchers.rb +520 -173
- data.tar.gz.sig +0 -0
- metadata +141 -242
- metadata.gz.sig +2 -0
- data/features/README.md +0 -48
- data/features/Upgrade.md +0 -53
- data/features/built_in_matchers/README.md +0 -90
- data/features/built_in_matchers/be.feature +0 -175
- data/features/built_in_matchers/be_within.feature +0 -48
- data/features/built_in_matchers/cover.feature +0 -47
- data/features/built_in_matchers/end_with.feature +0 -48
- data/features/built_in_matchers/equality.feature +0 -139
- data/features/built_in_matchers/exist.feature +0 -45
- data/features/built_in_matchers/expect_change.feature +0 -59
- data/features/built_in_matchers/expect_error.feature +0 -144
- data/features/built_in_matchers/have.feature +0 -109
- data/features/built_in_matchers/include.feature +0 -174
- data/features/built_in_matchers/match.feature +0 -52
- data/features/built_in_matchers/operators.feature +0 -227
- data/features/built_in_matchers/predicates.feature +0 -137
- data/features/built_in_matchers/respond_to.feature +0 -84
- data/features/built_in_matchers/satisfy.feature +0 -33
- data/features/built_in_matchers/start_with.feature +0 -48
- data/features/built_in_matchers/throw_symbol.feature +0 -91
- data/features/built_in_matchers/types.feature +0 -116
- data/features/built_in_matchers/yield.feature +0 -161
- data/features/custom_matchers/access_running_example.feature +0 -53
- data/features/custom_matchers/define_diffable_matcher.feature +0 -27
- data/features/custom_matchers/define_matcher.feature +0 -368
- data/features/custom_matchers/define_matcher_outside_rspec.feature +0 -38
- data/features/custom_matchers/define_matcher_with_fluent_interface.feature +0 -24
- data/features/customized_message.feature +0 -22
- data/features/diffing.feature +0 -85
- data/features/implicit_docstrings.feature +0 -52
- data/features/step_definitions/additional_cli_steps.rb +0 -22
- data/features/support/env.rb +0 -14
- data/features/syntax_configuration.feature +0 -71
- data/features/test_frameworks/test_unit.feature +0 -44
- data/lib/rspec/expectations/deprecation.rb +0 -17
- data/lib/rspec/expectations/differ.rb +0 -133
- data/lib/rspec/expectations/errors.rb +0 -9
- data/lib/rspec/expectations/extensions/array.rb +0 -9
- data/lib/rspec/expectations/extensions/object.rb +0 -29
- data/lib/rspec/expectations/extensions.rb +0 -2
- data/lib/rspec/matchers/be_close.rb +0 -9
- data/lib/rspec/matchers/built_in/have.rb +0 -124
- data/lib/rspec/matchers/built_in/match_array.rb +0 -51
- data/lib/rspec/matchers/built_in/start_and_end_with.rb +0 -48
- data/lib/rspec/matchers/compatibility.rb +0 -14
- data/lib/rspec/matchers/configuration.rb +0 -108
- data/lib/rspec/matchers/extensions/instance_eval_with_args.rb +0 -39
- data/lib/rspec/matchers/matcher.rb +0 -300
- data/lib/rspec/matchers/method_missing.rb +0 -12
- data/lib/rspec/matchers/operator_matcher.rb +0 -109
- data/lib/rspec/matchers/pretty.rb +0 -70
- data/lib/rspec/matchers/test_unit_integration.rb +0 -11
- data/lib/rspec-expectations.rb +0 -1
- data/spec/rspec/expectations/differ_spec.rb +0 -192
- data/spec/rspec/expectations/expectation_target_spec.rb +0 -82
- data/spec/rspec/expectations/extensions/kernel_spec.rb +0 -67
- data/spec/rspec/expectations/fail_with_spec.rb +0 -114
- data/spec/rspec/expectations/handler_spec.rb +0 -227
- data/spec/rspec/expectations/syntax_spec.rb +0 -139
- data/spec/rspec/matchers/base_matcher_spec.rb +0 -62
- data/spec/rspec/matchers/be_close_spec.rb +0 -22
- data/spec/rspec/matchers/be_instance_of_spec.rb +0 -63
- data/spec/rspec/matchers/be_kind_of_spec.rb +0 -41
- data/spec/rspec/matchers/be_spec.rb +0 -516
- data/spec/rspec/matchers/be_within_spec.rb +0 -137
- data/spec/rspec/matchers/change_spec.rb +0 -553
- data/spec/rspec/matchers/configuration_spec.rb +0 -206
- data/spec/rspec/matchers/cover_spec.rb +0 -69
- data/spec/rspec/matchers/description_generation_spec.rb +0 -190
- data/spec/rspec/matchers/dsl_spec.rb +0 -57
- data/spec/rspec/matchers/eq_spec.rb +0 -60
- data/spec/rspec/matchers/eql_spec.rb +0 -41
- data/spec/rspec/matchers/equal_spec.rb +0 -78
- data/spec/rspec/matchers/exist_spec.rb +0 -124
- data/spec/rspec/matchers/has_spec.rb +0 -122
- data/spec/rspec/matchers/have_spec.rb +0 -455
- data/spec/rspec/matchers/include_matcher_integration_spec.rb +0 -30
- data/spec/rspec/matchers/include_spec.rb +0 -531
- data/spec/rspec/matchers/match_array_spec.rb +0 -194
- data/spec/rspec/matchers/match_spec.rb +0 -61
- data/spec/rspec/matchers/matcher_spec.rb +0 -471
- data/spec/rspec/matchers/matchers_spec.rb +0 -37
- data/spec/rspec/matchers/method_missing_spec.rb +0 -28
- data/spec/rspec/matchers/operator_matcher_spec.rb +0 -223
- data/spec/rspec/matchers/raise_error_spec.rb +0 -485
- data/spec/rspec/matchers/respond_to_spec.rb +0 -292
- data/spec/rspec/matchers/satisfy_spec.rb +0 -44
- data/spec/rspec/matchers/start_with_end_with_spec.rb +0 -186
- data/spec/rspec/matchers/throw_symbol_spec.rb +0 -116
- data/spec/rspec/matchers/yield_spec.rb +0 -514
- data/spec/spec_helper.rb +0 -54
- data/spec/support/classes.rb +0 -56
- data/spec/support/in_sub_process.rb +0 -38
- data/spec/support/matchers.rb +0 -22
- data/spec/support/ruby_version.rb +0 -10
- data/spec/support/shared_examples.rb +0 -13
data.tar.gz.sig
ADDED
Binary file
|
metadata
CHANGED
@@ -1,331 +1,230 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: rspec-expectations
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
|
5
|
-
version: 2.14.0
|
4
|
+
version: 3.13.0
|
6
5
|
platform: ruby
|
7
6
|
authors:
|
8
7
|
- Steven Baker
|
9
8
|
- David Chelimsky
|
10
|
-
|
9
|
+
- Myron Marston
|
10
|
+
autorequire:
|
11
11
|
bindir: bin
|
12
|
-
cert_chain:
|
13
|
-
|
12
|
+
cert_chain:
|
13
|
+
- |
|
14
|
+
-----BEGIN CERTIFICATE-----
|
15
|
+
MIIF1TCCA72gAwIBAgIJAPXjfUbCjdXUMA0GCSqGSIb3DQEBBQUAMIGAMQswCQYD
|
16
|
+
VQQGEwJVUzETMBEGA1UECAwKV2FzaGluZ3RvbjEQMA4GA1UEBwwHU2VhdHRsZTEO
|
17
|
+
MAwGA1UECgwFUlNwZWMxEzARBgNVBAMMCnJzcGVjLmluZm8xJTAjBgkqhkiG9w0B
|
18
|
+
CQEWFnJzcGVjQGdvb2dsZWdyb3Vwcy5jb20wHhcNMTQxMjIzMDkzNTIyWhcNMjQx
|
19
|
+
MjIyMDkzNTIyWjCBgDELMAkGA1UEBhMCVVMxEzARBgNVBAgMCldhc2hpbmd0b24x
|
20
|
+
EDAOBgNVBAcMB1NlYXR0bGUxDjAMBgNVBAoMBVJTcGVjMRMwEQYDVQQDDApyc3Bl
|
21
|
+
Yy5pbmZvMSUwIwYJKoZIhvcNAQkBFhZyc3BlY0Bnb29nbGVncm91cHMuY29tMIIC
|
22
|
+
IjANBgkqhkiG9w0BAQEFAAOCAg8AMIICCgKCAgEAsSmjgcHaKlD0jizRJowi2bGI
|
23
|
+
KMOHnJoExxRNHHxH+3w9kkl95YldvDRVX495b13ZCzwRe0AyqX24wq04tp0G5Z5C
|
24
|
+
e/w2pnNK4ol1eECPwQu+YGpepeODlZICL5gwQspe0cDifbBnHx5QySMiPpvx6bC0
|
25
|
+
tQTox0ppDIaMhch8IPCwyoE4DQK5bpsdwnLSHTsQjUIb7IM8tUMpd/iKrJgNffwc
|
26
|
+
6gC1TmhIlzQoB26nCNh9uK7xZjUM+sGECzvcYuImchUaIgJA/ybrlZS+m/hxzvBo
|
27
|
+
mLnn/xNEC6Vz5HG+3TR0Gb0cSUf6XUu2s51Jk/SJi3MhCZp2gs9OUg4EVZNzQVkZ
|
28
|
+
efLBjAZG2Mxk14JyB4/Omc+Jk0ajprINCBbUNnxzCJrYDM3J9TVWIwyUGNX/U3MO
|
29
|
+
s3tMAT+EVgx/mZMPnBO8EULlyF51MRUp3Wy9Mnw8AYLk30UnMG5AjqgO5JNyFlA7
|
30
|
+
Xeh3EVdWY3vMB1pkhPwlsenpcmj5gOzrd54lELOVbCGHCf48iSqeflY2Lhe0pvzK
|
31
|
+
blXCJBDmtrebvus291rM/dHcbEfK1SVd5Wut/n131iouf6dnNCFskFygDcgBbthC
|
32
|
+
gpEMqf80lEmhX59VUsm0Pv6OEo+ZPHBvXPiJA6DShQh9t3YtpwyA8uVDMbT/i32u
|
33
|
+
2FUsqZbbJcCmkBrGposCAwEAAaNQME4wHQYDVR0OBBYEFPPvQ5XT0Nvuhi6k+hrW
|
34
|
+
Vv35J+TeMB8GA1UdIwQYMBaAFPPvQ5XT0Nvuhi6k+hrWVv35J+TeMAwGA1UdEwQF
|
35
|
+
MAMBAf8wDQYJKoZIhvcNAQEFBQADggIBAIqbQSWH2aAF537DKwAMB8nMFsoe24MD
|
36
|
+
gtuQAyjTtbH+QBE4N2RdQF/sU7Y3PYR7nqdrCsYc3RxyqM5XXi7I3IYdpfe1RuxY
|
37
|
+
+pyPzVQsPPDhMlJlCrwJsADnxlpxZlAgxYSLKOan55ihscaAWA90wqRUrf/ZJM36
|
38
|
+
8LWCPVn5teIt5aaxZWX68RMxa+AXvpbtJOBwXLkIFk3apD8CX4DhelIdw67DbkUe
|
39
|
+
ghUd/u62qrnqBTVgditt7OoWIZjzh24/Fda5d0MxZyvLILGOrf5bN4cTbe/q9Cid
|
40
|
+
Xrik7Upm+mu3y3yQIfrw85xybHq6iNXyYHvCdSrFfCIKrGpd/0CAdmYnJlx59Fk/
|
41
|
+
UbD3Eyx4psBSkU+WKO0Uf+3zNI7N/nVeNIwU/Ft+l8l7/K+427656c+ZGWDO0Gt/
|
42
|
+
BeEOSTDKP7qQ1T+JvMrBcBQo+i0cnRT10J1aoV90BhxsvWTRizIbugbaqR6Tq3bj
|
43
|
+
Akt00cIlNSplL6DenIAKSh5kF7s0tRD0tC3bNkZmNjNGkdoGEcUODEpTB3RHKKiu
|
44
|
+
e6k2Jg6m00z5vGFQhOnROG/QaUzMA3A3mFBe1RHFo07xd0pFeoeWL3vF69Gx9Jwp
|
45
|
+
ZsVDj6a7lH3cNqtWXZxrb2wO38qV5AkYj8SQK7Hj3/Yui9myUX3crr+PdetazSqQ
|
46
|
+
F3MdtaDehhjC
|
47
|
+
-----END CERTIFICATE-----
|
48
|
+
date: 2024-02-04 00:00:00.000000000 Z
|
14
49
|
dependencies:
|
15
50
|
- !ruby/object:Gem::Dependency
|
16
|
-
|
51
|
+
name: rspec-support
|
52
|
+
requirement: !ruby/object:Gem::Requirement
|
17
53
|
requirements:
|
18
|
-
- -
|
19
|
-
- !ruby/object:Gem::Version
|
20
|
-
version: 1.1.3
|
21
|
-
- - <
|
54
|
+
- - "~>"
|
22
55
|
- !ruby/object:Gem::Version
|
23
|
-
version:
|
24
|
-
|
56
|
+
version: 3.13.0
|
57
|
+
type: :runtime
|
25
58
|
prerelease: false
|
59
|
+
version_requirements: !ruby/object:Gem::Requirement
|
60
|
+
requirements:
|
61
|
+
- - "~>"
|
62
|
+
- !ruby/object:Gem::Version
|
63
|
+
version: 3.13.0
|
64
|
+
- !ruby/object:Gem::Dependency
|
26
65
|
name: diff-lcs
|
27
66
|
requirement: !ruby/object:Gem::Requirement
|
28
67
|
requirements:
|
29
|
-
- -
|
68
|
+
- - ">="
|
30
69
|
- !ruby/object:Gem::Version
|
31
|
-
version: 1.
|
32
|
-
- - <
|
70
|
+
version: 1.2.0
|
71
|
+
- - "<"
|
33
72
|
- !ruby/object:Gem::Version
|
34
73
|
version: '2.0'
|
35
|
-
none: false
|
36
74
|
type: :runtime
|
37
|
-
|
75
|
+
prerelease: false
|
38
76
|
version_requirements: !ruby/object:Gem::Requirement
|
39
77
|
requirements:
|
40
|
-
- -
|
78
|
+
- - ">="
|
41
79
|
- !ruby/object:Gem::Version
|
42
|
-
version:
|
43
|
-
|
44
|
-
|
45
|
-
|
80
|
+
version: 1.2.0
|
81
|
+
- - "<"
|
82
|
+
- !ruby/object:Gem::Version
|
83
|
+
version: '2.0'
|
84
|
+
- !ruby/object:Gem::Dependency
|
85
|
+
name: aruba
|
46
86
|
requirement: !ruby/object:Gem::Requirement
|
47
87
|
requirements:
|
48
|
-
- - ~>
|
88
|
+
- - "~>"
|
49
89
|
- !ruby/object:Gem::Version
|
50
|
-
version:
|
51
|
-
none: false
|
90
|
+
version: 0.14.10
|
52
91
|
type: :development
|
53
|
-
|
92
|
+
prerelease: false
|
54
93
|
version_requirements: !ruby/object:Gem::Requirement
|
55
94
|
requirements:
|
56
|
-
- - ~>
|
95
|
+
- - "~>"
|
57
96
|
- !ruby/object:Gem::Version
|
58
|
-
version:
|
59
|
-
|
60
|
-
prerelease: false
|
97
|
+
version: 0.14.10
|
98
|
+
- !ruby/object:Gem::Dependency
|
61
99
|
name: cucumber
|
62
100
|
requirement: !ruby/object:Gem::Requirement
|
63
101
|
requirements:
|
64
|
-
- -
|
102
|
+
- - ">="
|
65
103
|
- !ruby/object:Gem::Version
|
66
|
-
version: 1.
|
67
|
-
none: false
|
104
|
+
version: '1.3'
|
68
105
|
type: :development
|
69
|
-
|
106
|
+
prerelease: false
|
70
107
|
version_requirements: !ruby/object:Gem::Requirement
|
71
108
|
requirements:
|
72
|
-
- -
|
109
|
+
- - ">="
|
110
|
+
- !ruby/object:Gem::Version
|
111
|
+
version: '1.3'
|
112
|
+
- !ruby/object:Gem::Dependency
|
113
|
+
name: minitest
|
114
|
+
requirement: !ruby/object:Gem::Requirement
|
115
|
+
requirements:
|
116
|
+
- - "~>"
|
73
117
|
- !ruby/object:Gem::Version
|
74
|
-
version: '
|
75
|
-
|
118
|
+
version: '5.2'
|
119
|
+
type: :development
|
76
120
|
prerelease: false
|
77
|
-
|
121
|
+
version_requirements: !ruby/object:Gem::Requirement
|
122
|
+
requirements:
|
123
|
+
- - "~>"
|
124
|
+
- !ruby/object:Gem::Version
|
125
|
+
version: '5.2'
|
126
|
+
- !ruby/object:Gem::Dependency
|
127
|
+
name: rake
|
78
128
|
requirement: !ruby/object:Gem::Requirement
|
79
129
|
requirements:
|
80
|
-
- -
|
130
|
+
- - ">"
|
81
131
|
- !ruby/object:Gem::Version
|
82
|
-
version:
|
83
|
-
none: false
|
132
|
+
version: 10.0.0
|
84
133
|
type: :development
|
85
|
-
|
86
|
-
|
134
|
+
prerelease: false
|
135
|
+
version_requirements: !ruby/object:Gem::Requirement
|
136
|
+
requirements:
|
137
|
+
- - ">"
|
138
|
+
- !ruby/object:Gem::Version
|
139
|
+
version: 10.0.0
|
140
|
+
description: rspec-expectations provides a simple, readable API to express expected
|
141
|
+
outcomes of a code example.
|
142
|
+
email: rspec@googlegroups.com
|
87
143
|
executables: []
|
88
144
|
extensions: []
|
89
145
|
extra_rdoc_files: []
|
90
146
|
files:
|
91
|
-
-
|
147
|
+
- ".document"
|
148
|
+
- ".yardopts"
|
149
|
+
- Changelog.md
|
150
|
+
- LICENSE.md
|
151
|
+
- README.md
|
92
152
|
- lib/rspec/expectations.rb
|
93
|
-
- lib/rspec/expectations/
|
94
|
-
- lib/rspec/expectations/
|
95
|
-
- lib/rspec/expectations/errors.rb
|
153
|
+
- lib/rspec/expectations/block_snippet_extractor.rb
|
154
|
+
- lib/rspec/expectations/configuration.rb
|
96
155
|
- lib/rspec/expectations/expectation_target.rb
|
97
|
-
- lib/rspec/expectations/extensions.rb
|
98
|
-
- lib/rspec/expectations/extensions/array.rb
|
99
|
-
- lib/rspec/expectations/extensions/object.rb
|
100
156
|
- lib/rspec/expectations/fail_with.rb
|
157
|
+
- lib/rspec/expectations/failure_aggregator.rb
|
101
158
|
- lib/rspec/expectations/handler.rb
|
159
|
+
- lib/rspec/expectations/minitest_integration.rb
|
102
160
|
- lib/rspec/expectations/syntax.rb
|
103
161
|
- lib/rspec/expectations/version.rb
|
104
162
|
- lib/rspec/matchers.rb
|
105
|
-
- lib/rspec/matchers/
|
163
|
+
- lib/rspec/matchers/aliased_matcher.rb
|
106
164
|
- lib/rspec/matchers/built_in.rb
|
165
|
+
- lib/rspec/matchers/built_in/all.rb
|
107
166
|
- lib/rspec/matchers/built_in/base_matcher.rb
|
108
167
|
- lib/rspec/matchers/built_in/be.rb
|
168
|
+
- lib/rspec/matchers/built_in/be_between.rb
|
109
169
|
- lib/rspec/matchers/built_in/be_instance_of.rb
|
110
170
|
- lib/rspec/matchers/built_in/be_kind_of.rb
|
111
171
|
- lib/rspec/matchers/built_in/be_within.rb
|
112
172
|
- lib/rspec/matchers/built_in/change.rb
|
173
|
+
- lib/rspec/matchers/built_in/compound.rb
|
174
|
+
- lib/rspec/matchers/built_in/contain_exactly.rb
|
175
|
+
- lib/rspec/matchers/built_in/count_expectation.rb
|
113
176
|
- lib/rspec/matchers/built_in/cover.rb
|
114
177
|
- lib/rspec/matchers/built_in/eq.rb
|
115
178
|
- lib/rspec/matchers/built_in/eql.rb
|
116
179
|
- lib/rspec/matchers/built_in/equal.rb
|
117
180
|
- lib/rspec/matchers/built_in/exist.rb
|
118
181
|
- lib/rspec/matchers/built_in/has.rb
|
119
|
-
- lib/rspec/matchers/built_in/
|
182
|
+
- lib/rspec/matchers/built_in/have_attributes.rb
|
120
183
|
- lib/rspec/matchers/built_in/include.rb
|
121
184
|
- lib/rspec/matchers/built_in/match.rb
|
122
|
-
- lib/rspec/matchers/built_in/
|
185
|
+
- lib/rspec/matchers/built_in/operators.rb
|
186
|
+
- lib/rspec/matchers/built_in/output.rb
|
123
187
|
- lib/rspec/matchers/built_in/raise_error.rb
|
124
188
|
- lib/rspec/matchers/built_in/respond_to.rb
|
125
189
|
- lib/rspec/matchers/built_in/satisfy.rb
|
126
|
-
- lib/rspec/matchers/built_in/
|
190
|
+
- lib/rspec/matchers/built_in/start_or_end_with.rb
|
127
191
|
- lib/rspec/matchers/built_in/throw_symbol.rb
|
128
192
|
- lib/rspec/matchers/built_in/yield.rb
|
129
|
-
- lib/rspec/matchers/
|
130
|
-
- lib/rspec/matchers/configuration.rb
|
193
|
+
- lib/rspec/matchers/composable.rb
|
131
194
|
- lib/rspec/matchers/dsl.rb
|
132
|
-
- lib/rspec/matchers/
|
195
|
+
- lib/rspec/matchers/english_phrasing.rb
|
196
|
+
- lib/rspec/matchers/fail_matchers.rb
|
133
197
|
- lib/rspec/matchers/generated_descriptions.rb
|
134
|
-
- lib/rspec/matchers/
|
135
|
-
- lib/rspec/matchers/
|
136
|
-
- lib/rspec/matchers/
|
137
|
-
|
138
|
-
- lib/rspec/matchers/test_unit_integration.rb
|
139
|
-
- README.md
|
140
|
-
- License.txt
|
141
|
-
- Changelog.md
|
142
|
-
- .yardopts
|
143
|
-
- .document
|
144
|
-
- features/README.md
|
145
|
-
- features/Upgrade.md
|
146
|
-
- features/built_in_matchers/README.md
|
147
|
-
- features/built_in_matchers/be.feature
|
148
|
-
- features/built_in_matchers/be_within.feature
|
149
|
-
- features/built_in_matchers/cover.feature
|
150
|
-
- features/built_in_matchers/end_with.feature
|
151
|
-
- features/built_in_matchers/equality.feature
|
152
|
-
- features/built_in_matchers/exist.feature
|
153
|
-
- features/built_in_matchers/expect_change.feature
|
154
|
-
- features/built_in_matchers/expect_error.feature
|
155
|
-
- features/built_in_matchers/have.feature
|
156
|
-
- features/built_in_matchers/include.feature
|
157
|
-
- features/built_in_matchers/match.feature
|
158
|
-
- features/built_in_matchers/operators.feature
|
159
|
-
- features/built_in_matchers/predicates.feature
|
160
|
-
- features/built_in_matchers/respond_to.feature
|
161
|
-
- features/built_in_matchers/satisfy.feature
|
162
|
-
- features/built_in_matchers/start_with.feature
|
163
|
-
- features/built_in_matchers/throw_symbol.feature
|
164
|
-
- features/built_in_matchers/types.feature
|
165
|
-
- features/built_in_matchers/yield.feature
|
166
|
-
- features/custom_matchers/access_running_example.feature
|
167
|
-
- features/custom_matchers/define_diffable_matcher.feature
|
168
|
-
- features/custom_matchers/define_matcher.feature
|
169
|
-
- features/custom_matchers/define_matcher_outside_rspec.feature
|
170
|
-
- features/custom_matchers/define_matcher_with_fluent_interface.feature
|
171
|
-
- features/customized_message.feature
|
172
|
-
- features/diffing.feature
|
173
|
-
- features/implicit_docstrings.feature
|
174
|
-
- features/step_definitions/additional_cli_steps.rb
|
175
|
-
- features/support/env.rb
|
176
|
-
- features/syntax_configuration.feature
|
177
|
-
- features/test_frameworks/test_unit.feature
|
178
|
-
- spec/rspec/expectations/differ_spec.rb
|
179
|
-
- spec/rspec/expectations/expectation_target_spec.rb
|
180
|
-
- spec/rspec/expectations/extensions/kernel_spec.rb
|
181
|
-
- spec/rspec/expectations/fail_with_spec.rb
|
182
|
-
- spec/rspec/expectations/handler_spec.rb
|
183
|
-
- spec/rspec/expectations/syntax_spec.rb
|
184
|
-
- spec/rspec/matchers/base_matcher_spec.rb
|
185
|
-
- spec/rspec/matchers/be_close_spec.rb
|
186
|
-
- spec/rspec/matchers/be_instance_of_spec.rb
|
187
|
-
- spec/rspec/matchers/be_kind_of_spec.rb
|
188
|
-
- spec/rspec/matchers/be_spec.rb
|
189
|
-
- spec/rspec/matchers/be_within_spec.rb
|
190
|
-
- spec/rspec/matchers/change_spec.rb
|
191
|
-
- spec/rspec/matchers/configuration_spec.rb
|
192
|
-
- spec/rspec/matchers/cover_spec.rb
|
193
|
-
- spec/rspec/matchers/description_generation_spec.rb
|
194
|
-
- spec/rspec/matchers/dsl_spec.rb
|
195
|
-
- spec/rspec/matchers/eq_spec.rb
|
196
|
-
- spec/rspec/matchers/eql_spec.rb
|
197
|
-
- spec/rspec/matchers/equal_spec.rb
|
198
|
-
- spec/rspec/matchers/exist_spec.rb
|
199
|
-
- spec/rspec/matchers/has_spec.rb
|
200
|
-
- spec/rspec/matchers/have_spec.rb
|
201
|
-
- spec/rspec/matchers/include_matcher_integration_spec.rb
|
202
|
-
- spec/rspec/matchers/include_spec.rb
|
203
|
-
- spec/rspec/matchers/match_array_spec.rb
|
204
|
-
- spec/rspec/matchers/match_spec.rb
|
205
|
-
- spec/rspec/matchers/matcher_spec.rb
|
206
|
-
- spec/rspec/matchers/matchers_spec.rb
|
207
|
-
- spec/rspec/matchers/method_missing_spec.rb
|
208
|
-
- spec/rspec/matchers/operator_matcher_spec.rb
|
209
|
-
- spec/rspec/matchers/raise_error_spec.rb
|
210
|
-
- spec/rspec/matchers/respond_to_spec.rb
|
211
|
-
- spec/rspec/matchers/satisfy_spec.rb
|
212
|
-
- spec/rspec/matchers/start_with_end_with_spec.rb
|
213
|
-
- spec/rspec/matchers/throw_symbol_spec.rb
|
214
|
-
- spec/rspec/matchers/yield_spec.rb
|
215
|
-
- spec/spec_helper.rb
|
216
|
-
- spec/support/classes.rb
|
217
|
-
- spec/support/in_sub_process.rb
|
218
|
-
- spec/support/matchers.rb
|
219
|
-
- spec/support/ruby_version.rb
|
220
|
-
- spec/support/shared_examples.rb
|
221
|
-
homepage: http://github.com/rspec/rspec-expectations
|
198
|
+
- lib/rspec/matchers/matcher_delegator.rb
|
199
|
+
- lib/rspec/matchers/matcher_protocol.rb
|
200
|
+
- lib/rspec/matchers/multi_matcher_diff.rb
|
201
|
+
homepage: https://github.com/rspec/rspec-expectations
|
222
202
|
licenses:
|
223
203
|
- MIT
|
224
|
-
|
204
|
+
metadata:
|
205
|
+
bug_tracker_uri: https://github.com/rspec/rspec-expectations/issues
|
206
|
+
changelog_uri: https://github.com/rspec/rspec-expectations/blob/v3.13.0/Changelog.md
|
207
|
+
documentation_uri: https://rspec.info/documentation/
|
208
|
+
mailing_list_uri: https://groups.google.com/forum/#!forum/rspec
|
209
|
+
source_code_uri: https://github.com/rspec/rspec-expectations
|
210
|
+
post_install_message:
|
225
211
|
rdoc_options:
|
226
|
-
- --charset=UTF-8
|
212
|
+
- "--charset=UTF-8"
|
227
213
|
require_paths:
|
228
214
|
- lib
|
229
215
|
required_ruby_version: !ruby/object:Gem::Requirement
|
230
216
|
requirements:
|
231
|
-
- -
|
217
|
+
- - ">="
|
232
218
|
- !ruby/object:Gem::Version
|
233
|
-
version:
|
234
|
-
segments:
|
235
|
-
- 0
|
236
|
-
hash: -2919541554530046896
|
237
|
-
none: false
|
219
|
+
version: 1.8.7
|
238
220
|
required_rubygems_version: !ruby/object:Gem::Requirement
|
239
221
|
requirements:
|
240
|
-
- -
|
222
|
+
- - ">="
|
241
223
|
- !ruby/object:Gem::Version
|
242
224
|
version: '0'
|
243
|
-
segments:
|
244
|
-
- 0
|
245
|
-
hash: -2919541554530046896
|
246
|
-
none: false
|
247
225
|
requirements: []
|
248
|
-
|
249
|
-
|
250
|
-
|
251
|
-
|
252
|
-
|
253
|
-
test_files:
|
254
|
-
- features/README.md
|
255
|
-
- features/Upgrade.md
|
256
|
-
- features/built_in_matchers/README.md
|
257
|
-
- features/built_in_matchers/be.feature
|
258
|
-
- features/built_in_matchers/be_within.feature
|
259
|
-
- features/built_in_matchers/cover.feature
|
260
|
-
- features/built_in_matchers/end_with.feature
|
261
|
-
- features/built_in_matchers/equality.feature
|
262
|
-
- features/built_in_matchers/exist.feature
|
263
|
-
- features/built_in_matchers/expect_change.feature
|
264
|
-
- features/built_in_matchers/expect_error.feature
|
265
|
-
- features/built_in_matchers/have.feature
|
266
|
-
- features/built_in_matchers/include.feature
|
267
|
-
- features/built_in_matchers/match.feature
|
268
|
-
- features/built_in_matchers/operators.feature
|
269
|
-
- features/built_in_matchers/predicates.feature
|
270
|
-
- features/built_in_matchers/respond_to.feature
|
271
|
-
- features/built_in_matchers/satisfy.feature
|
272
|
-
- features/built_in_matchers/start_with.feature
|
273
|
-
- features/built_in_matchers/throw_symbol.feature
|
274
|
-
- features/built_in_matchers/types.feature
|
275
|
-
- features/built_in_matchers/yield.feature
|
276
|
-
- features/custom_matchers/access_running_example.feature
|
277
|
-
- features/custom_matchers/define_diffable_matcher.feature
|
278
|
-
- features/custom_matchers/define_matcher.feature
|
279
|
-
- features/custom_matchers/define_matcher_outside_rspec.feature
|
280
|
-
- features/custom_matchers/define_matcher_with_fluent_interface.feature
|
281
|
-
- features/customized_message.feature
|
282
|
-
- features/diffing.feature
|
283
|
-
- features/implicit_docstrings.feature
|
284
|
-
- features/step_definitions/additional_cli_steps.rb
|
285
|
-
- features/support/env.rb
|
286
|
-
- features/syntax_configuration.feature
|
287
|
-
- features/test_frameworks/test_unit.feature
|
288
|
-
- spec/rspec/expectations/differ_spec.rb
|
289
|
-
- spec/rspec/expectations/expectation_target_spec.rb
|
290
|
-
- spec/rspec/expectations/extensions/kernel_spec.rb
|
291
|
-
- spec/rspec/expectations/fail_with_spec.rb
|
292
|
-
- spec/rspec/expectations/handler_spec.rb
|
293
|
-
- spec/rspec/expectations/syntax_spec.rb
|
294
|
-
- spec/rspec/matchers/base_matcher_spec.rb
|
295
|
-
- spec/rspec/matchers/be_close_spec.rb
|
296
|
-
- spec/rspec/matchers/be_instance_of_spec.rb
|
297
|
-
- spec/rspec/matchers/be_kind_of_spec.rb
|
298
|
-
- spec/rspec/matchers/be_spec.rb
|
299
|
-
- spec/rspec/matchers/be_within_spec.rb
|
300
|
-
- spec/rspec/matchers/change_spec.rb
|
301
|
-
- spec/rspec/matchers/configuration_spec.rb
|
302
|
-
- spec/rspec/matchers/cover_spec.rb
|
303
|
-
- spec/rspec/matchers/description_generation_spec.rb
|
304
|
-
- spec/rspec/matchers/dsl_spec.rb
|
305
|
-
- spec/rspec/matchers/eq_spec.rb
|
306
|
-
- spec/rspec/matchers/eql_spec.rb
|
307
|
-
- spec/rspec/matchers/equal_spec.rb
|
308
|
-
- spec/rspec/matchers/exist_spec.rb
|
309
|
-
- spec/rspec/matchers/has_spec.rb
|
310
|
-
- spec/rspec/matchers/have_spec.rb
|
311
|
-
- spec/rspec/matchers/include_matcher_integration_spec.rb
|
312
|
-
- spec/rspec/matchers/include_spec.rb
|
313
|
-
- spec/rspec/matchers/match_array_spec.rb
|
314
|
-
- spec/rspec/matchers/match_spec.rb
|
315
|
-
- spec/rspec/matchers/matcher_spec.rb
|
316
|
-
- spec/rspec/matchers/matchers_spec.rb
|
317
|
-
- spec/rspec/matchers/method_missing_spec.rb
|
318
|
-
- spec/rspec/matchers/operator_matcher_spec.rb
|
319
|
-
- spec/rspec/matchers/raise_error_spec.rb
|
320
|
-
- spec/rspec/matchers/respond_to_spec.rb
|
321
|
-
- spec/rspec/matchers/satisfy_spec.rb
|
322
|
-
- spec/rspec/matchers/start_with_end_with_spec.rb
|
323
|
-
- spec/rspec/matchers/throw_symbol_spec.rb
|
324
|
-
- spec/rspec/matchers/yield_spec.rb
|
325
|
-
- spec/spec_helper.rb
|
326
|
-
- spec/support/classes.rb
|
327
|
-
- spec/support/in_sub_process.rb
|
328
|
-
- spec/support/matchers.rb
|
329
|
-
- spec/support/ruby_version.rb
|
330
|
-
- spec/support/shared_examples.rb
|
331
|
-
has_rdoc:
|
226
|
+
rubygems_version: 3.3.26
|
227
|
+
signing_key:
|
228
|
+
specification_version: 4
|
229
|
+
summary: rspec-expectations-3.13.0
|
230
|
+
test_files: []
|
metadata.gz.sig
ADDED
@@ -0,0 +1,2 @@
|
|
1
|
+
:���-t$r�9z�p�{\�' O�<.m�J�p�口C���M7Et������h�vt��76S<V��Ұ��ar�|
|
2
|
+
B"��)���(l%ϋ�d�*Z�ad%��L)u����vyD��n� ^��v��dZyC����d��'zNc�2�x.��U�iZ�n�X�E6ͬ����a;~RF������U3�Lqg��^����ENʥ��i���l�z�/M��i���|���WD�c�2��wa�r�O�ab�xq�٥�Db<c��tmf�k�R�D�,p�I�d1b�䟭������YvF��ܔ~�e��ѱtk��8�ȑ�e�:���Y�c�z>�N��Mg%���$����T٩�]"V�$vHj&�2��܇��ʊ�Mh����/��c`����ӪOf�l����G�a�O�g��s3��#�1Q������l�$��q�`��u[��j$h����m�v�wT����K��@�`��8��(�]�T7���Wd�6:��z�˯�~���
|
data/features/README.md
DELETED
@@ -1,48 +0,0 @@
|
|
1
|
-
rspec-expectations is used to define expected outcomes.
|
2
|
-
|
3
|
-
describe Account do
|
4
|
-
it "has a balance of zero when first created" do
|
5
|
-
expect(Account.new.balance).to eq(Money.new(0))
|
6
|
-
end
|
7
|
-
end
|
8
|
-
|
9
|
-
## Basic structure
|
10
|
-
|
11
|
-
The basic structure of an rspec expectation is:
|
12
|
-
|
13
|
-
expect(actual).to matcher(expected)
|
14
|
-
expect(actual).not_to matcher(expected)
|
15
|
-
|
16
|
-
Note: You can also use `expect(..).to_not` instead of `expect(..).not_to`.
|
17
|
-
One is an alias to the other, so you can use whichever reads better to you.
|
18
|
-
|
19
|
-
#### Examples
|
20
|
-
|
21
|
-
expect(5).to eq(5)
|
22
|
-
expect(5).not_to eq(4)
|
23
|
-
|
24
|
-
## What is a matcher?
|
25
|
-
|
26
|
-
A Matcher is any object that responds to the following methods:
|
27
|
-
|
28
|
-
matches?(actual)
|
29
|
-
failure_message_for_should
|
30
|
-
|
31
|
-
These methods are also part of the matcher protocol, but are optional:
|
32
|
-
|
33
|
-
does_not_match?(actual)
|
34
|
-
failure_message_for_should_not
|
35
|
-
description
|
36
|
-
|
37
|
-
RSpec ships with a number of built-in matchers and a DSL for writing custom
|
38
|
-
matchers.
|
39
|
-
|
40
|
-
## Issues
|
41
|
-
|
42
|
-
The documentation for rspec-expectations is a work in progress. We'll be adding
|
43
|
-
Cucumber features over time, and clarifying existing ones. If you have
|
44
|
-
specific features you'd like to see added, find the existing documentation
|
45
|
-
incomplete or confusing, or, better yet, wish to write a missing Cucumber
|
46
|
-
feature yourself, please [submit an
|
47
|
-
issue](http://github.com/rspec/rspec-expectations/issues) or a [pull
|
48
|
-
request](http://github.com/rspec/rspec-expectations).
|
data/features/Upgrade.md
DELETED
@@ -1,53 +0,0 @@
|
|
1
|
-
# Upgrade to rspec-expectations-2.0
|
2
|
-
|
3
|
-
## What's new
|
4
|
-
|
5
|
-
### New `eq` matcher.
|
6
|
-
|
7
|
-
`RSpec::Matchers` now offers you two approaches to differentiating between
|
8
|
-
object identity. You can use the rspec-1 approach:
|
9
|
-
|
10
|
-
actual.should == expected # object equality
|
11
|
-
actual.should equal(expected) # object identity
|
12
|
-
|
13
|
-
... or, if you prefer:
|
14
|
-
|
15
|
-
actual.should eq(expected) # object equality
|
16
|
-
actual.should be(expected) # object identity
|
17
|
-
|
18
|
-
## What's been removed
|
19
|
-
|
20
|
-
### simple_matcher
|
21
|
-
|
22
|
-
Use RSpec::Matchers.define instead. For example, if you had:
|
23
|
-
|
24
|
-
def eat_cheese
|
25
|
-
simple_matcher("eat cheese") do |actual|
|
26
|
-
actual.eat?(:cheese)
|
27
|
-
end
|
28
|
-
end
|
29
|
-
|
30
|
-
Change it to:
|
31
|
-
|
32
|
-
RSpec::Matchers.define :eat_cheese do
|
33
|
-
match do |actual|
|
34
|
-
actual.eat?(:cheese)
|
35
|
-
end
|
36
|
-
end
|
37
|
-
|
38
|
-
### wrap_expectation
|
39
|
-
|
40
|
-
Use RSpec::Matchers.define instead.
|
41
|
-
|
42
|
-
RSpec::Matchers.define :eat_cheese do
|
43
|
-
match do |actual|
|
44
|
-
actual.should eat?(:cheese)
|
45
|
-
end
|
46
|
-
end
|
47
|
-
|
48
|
-
RSpec::Matchers.define :eat_cheese do
|
49
|
-
include MyCheesyAssertions
|
50
|
-
match_unless_raises Test::Unit::AssertionFailedError do |actual|
|
51
|
-
assert_eats_chesse actual
|
52
|
-
end
|
53
|
-
end
|
@@ -1,90 +0,0 @@
|
|
1
|
-
# Built-in Matchers
|
2
|
-
|
3
|
-
rspec-expectations ships with a number of built-in matchers.
|
4
|
-
Each matcher can be used with `expect(..).to` or `expect(..).not_to` to define
|
5
|
-
positive and negative expectations respectively on an object. Most matchers can
|
6
|
-
also be accessed using the `(...).should` and `(...).should_not` syntax, see
|
7
|
-
[using should syntax](https://github.com/rspec/rspec-expectations/blob/master/Should.md)
|
8
|
-
for why we recommend using `expect`.
|
9
|
-
|
10
|
-
e.g.
|
11
|
-
|
12
|
-
expect(result).to eq(3)
|
13
|
-
expect(list).not_to be_empty
|
14
|
-
pi.should be > 3
|
15
|
-
|
16
|
-
## Object identity
|
17
|
-
|
18
|
-
expect(actual).to be(expected) # passes if actual.equal?(expected)
|
19
|
-
|
20
|
-
## Object equivalence
|
21
|
-
|
22
|
-
expect(actual).to eq(expected) # passes if actual == expected
|
23
|
-
|
24
|
-
## Optional APIs for identity/equivalence
|
25
|
-
|
26
|
-
expect(actual).to eql(expected) # passes if actual.eql?(expected)
|
27
|
-
expect(actual).to equal(expected) # passes if actual.equal?(expected)
|
28
|
-
|
29
|
-
# NOTE: `expect` does not support `==` matcher.
|
30
|
-
|
31
|
-
## Comparisons
|
32
|
-
|
33
|
-
expect(actual).to be > expected
|
34
|
-
expect(actual).to be >= expected
|
35
|
-
expect(actual).to be <= expected
|
36
|
-
expect(actual).to be < expected
|
37
|
-
expect(actual).to match(/expression/)
|
38
|
-
expect(actual).to be_within(delta).of(expected)
|
39
|
-
|
40
|
-
# NOTE: `expect` does not support `=~` matcher.
|
41
|
-
|
42
|
-
## Types/classes
|
43
|
-
|
44
|
-
expect(actual).to be_instance_of(expected)
|
45
|
-
expect(actual).to be_kind_of(expected)
|
46
|
-
|
47
|
-
## Truthiness and existentialism
|
48
|
-
|
49
|
-
expect(actual).to be_true # passes if actual is truthy (not nil or false)
|
50
|
-
expect(actual).to be_false # passes if actual is falsy (nil or false)
|
51
|
-
expect(actual).to be_nil # passes if actual is nil
|
52
|
-
expect(actual).to be # passes if actual is truthy (not nil or false)
|
53
|
-
|
54
|
-
## Expecting errors
|
55
|
-
|
56
|
-
expect { ... }.to raise_error
|
57
|
-
expect { ... }.to raise_error(ErrorClass)
|
58
|
-
expect { ... }.to raise_error("message")
|
59
|
-
expect { ... }.to raise_error(ErrorClass, "message")
|
60
|
-
|
61
|
-
## Expecting throws
|
62
|
-
|
63
|
-
expect { ... }.to throw_symbol
|
64
|
-
expect { ... }.to throw_symbol(:symbol)
|
65
|
-
expect { ... }.to throw_symbol(:symbol, 'value')
|
66
|
-
|
67
|
-
## Predicate matchers
|
68
|
-
|
69
|
-
expect(actual).to be_xxx # passes if actual.xxx?
|
70
|
-
expect(actual).to have_xxx(:arg) # passes if actual.has_xxx?(:arg)
|
71
|
-
|
72
|
-
### Examples
|
73
|
-
|
74
|
-
expect([]).to be_empty
|
75
|
-
expect(:a => 1).to have_key(:a)
|
76
|
-
|
77
|
-
## Collection membership
|
78
|
-
|
79
|
-
expect(actual).to include(expected)
|
80
|
-
|
81
|
-
### Examples
|
82
|
-
|
83
|
-
expect([1,2,3]).to include(1)
|
84
|
-
expect([1,2,3]).to include(1, 2)
|
85
|
-
expect(:a => 'b').to include(:a => 'b')
|
86
|
-
expect("this string").to include("is str")
|
87
|
-
|
88
|
-
## Ranges (1.9 only)
|
89
|
-
|
90
|
-
expect(1..10).to cover(3)
|