rspec-expectations 2.11.3 → 3.11.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.
Files changed (152) hide show
  1. checksums.yaml +7 -0
  2. checksums.yaml.gz.sig +0 -0
  3. data/.document +1 -1
  4. data/.yardopts +1 -1
  5. data/Changelog.md +1026 -21
  6. data/{License.txt → LICENSE.md} +5 -3
  7. data/README.md +174 -78
  8. data/lib/rspec/expectations/block_snippet_extractor.rb +253 -0
  9. data/lib/rspec/expectations/configuration.rb +230 -0
  10. data/lib/rspec/expectations/expectation_target.rb +130 -55
  11. data/lib/rspec/expectations/fail_with.rb +17 -33
  12. data/lib/rspec/expectations/failure_aggregator.rb +212 -0
  13. data/lib/rspec/expectations/handler.rb +163 -29
  14. data/lib/rspec/expectations/minitest_integration.rb +58 -0
  15. data/lib/rspec/expectations/syntax.rb +68 -54
  16. data/lib/rspec/expectations/version.rb +1 -1
  17. data/lib/rspec/expectations.rb +59 -24
  18. data/lib/rspec/matchers/aliased_matcher.rb +116 -0
  19. data/lib/rspec/matchers/built_in/all.rb +86 -0
  20. data/lib/rspec/matchers/built_in/base_matcher.rb +150 -20
  21. data/lib/rspec/matchers/built_in/be.rb +115 -109
  22. data/lib/rspec/matchers/built_in/be_between.rb +77 -0
  23. data/lib/rspec/matchers/built_in/be_instance_of.rb +16 -1
  24. data/lib/rspec/matchers/built_in/be_kind_of.rb +10 -1
  25. data/lib/rspec/matchers/built_in/be_within.rb +43 -17
  26. data/lib/rspec/matchers/built_in/change.rb +392 -75
  27. data/lib/rspec/matchers/built_in/compound.rb +290 -0
  28. data/lib/rspec/matchers/built_in/contain_exactly.rb +302 -0
  29. data/lib/rspec/matchers/built_in/count_expectation.rb +169 -0
  30. data/lib/rspec/matchers/built_in/cover.rb +3 -0
  31. data/lib/rspec/matchers/built_in/eq.rb +26 -8
  32. data/lib/rspec/matchers/built_in/eql.rb +19 -8
  33. data/lib/rspec/matchers/built_in/equal.rb +56 -19
  34. data/lib/rspec/matchers/built_in/exist.rb +74 -10
  35. data/lib/rspec/matchers/built_in/has.rb +141 -22
  36. data/lib/rspec/matchers/built_in/have_attributes.rb +114 -0
  37. data/lib/rspec/matchers/built_in/include.rb +175 -20
  38. data/lib/rspec/matchers/built_in/match.rb +95 -1
  39. data/lib/rspec/matchers/built_in/operators.rb +128 -0
  40. data/lib/rspec/matchers/built_in/output.rb +207 -0
  41. data/lib/rspec/matchers/built_in/raise_error.rb +212 -38
  42. data/lib/rspec/matchers/built_in/respond_to.rb +155 -29
  43. data/lib/rspec/matchers/built_in/satisfy.rb +39 -9
  44. data/lib/rspec/matchers/built_in/start_or_end_with.rb +94 -0
  45. data/lib/rspec/matchers/built_in/throw_symbol.rb +58 -14
  46. data/lib/rspec/matchers/built_in/yield.rb +252 -98
  47. data/lib/rspec/matchers/built_in.rb +47 -33
  48. data/lib/rspec/matchers/composable.rb +171 -0
  49. data/lib/rspec/matchers/dsl.rb +530 -10
  50. data/lib/rspec/matchers/english_phrasing.rb +58 -0
  51. data/lib/rspec/matchers/expecteds_for_multiple_diffs.rb +82 -0
  52. data/lib/rspec/matchers/fail_matchers.rb +42 -0
  53. data/lib/rspec/matchers/generated_descriptions.rb +15 -10
  54. data/lib/rspec/matchers/matcher_delegator.rb +35 -0
  55. data/lib/rspec/matchers/matcher_protocol.rb +105 -0
  56. data/lib/rspec/matchers.rb +604 -252
  57. data.tar.gz.sig +0 -0
  58. metadata +178 -278
  59. metadata.gz.sig +0 -0
  60. data/features/README.md +0 -49
  61. data/features/Upgrade.md +0 -53
  62. data/features/built_in_matchers/README.md +0 -90
  63. data/features/built_in_matchers/be.feature +0 -173
  64. data/features/built_in_matchers/be_within.feature +0 -46
  65. data/features/built_in_matchers/cover.feature +0 -45
  66. data/features/built_in_matchers/end_with.feature +0 -46
  67. data/features/built_in_matchers/equality.feature +0 -145
  68. data/features/built_in_matchers/exist.feature +0 -43
  69. data/features/built_in_matchers/expect_change.feature +0 -59
  70. data/features/built_in_matchers/expect_error.feature +0 -138
  71. data/features/built_in_matchers/have.feature +0 -103
  72. data/features/built_in_matchers/include.feature +0 -121
  73. data/features/built_in_matchers/match.feature +0 -50
  74. data/features/built_in_matchers/operators.feature +0 -221
  75. data/features/built_in_matchers/predicates.feature +0 -128
  76. data/features/built_in_matchers/respond_to.feature +0 -78
  77. data/features/built_in_matchers/satisfy.feature +0 -31
  78. data/features/built_in_matchers/start_with.feature +0 -46
  79. data/features/built_in_matchers/throw_symbol.feature +0 -85
  80. data/features/built_in_matchers/types.feature +0 -114
  81. data/features/built_in_matchers/yield.feature +0 -146
  82. data/features/custom_matchers/access_running_example.feature +0 -53
  83. data/features/custom_matchers/define_diffable_matcher.feature +0 -27
  84. data/features/custom_matchers/define_matcher.feature +0 -340
  85. data/features/custom_matchers/define_matcher_outside_rspec.feature +0 -38
  86. data/features/custom_matchers/define_matcher_with_fluent_interface.feature +0 -24
  87. data/features/customized_message.feature +0 -22
  88. data/features/diffing.feature +0 -85
  89. data/features/implicit_docstrings.feature +0 -52
  90. data/features/step_definitions/additional_cli_steps.rb +0 -22
  91. data/features/support/env.rb +0 -5
  92. data/features/syntax_configuration.feature +0 -68
  93. data/features/test_frameworks/test_unit.feature +0 -46
  94. data/lib/rspec/expectations/deprecation.rb +0 -38
  95. data/lib/rspec/expectations/differ.rb +0 -81
  96. data/lib/rspec/expectations/errors.rb +0 -9
  97. data/lib/rspec/expectations/extensions/array.rb +0 -9
  98. data/lib/rspec/expectations/extensions/object.rb +0 -39
  99. data/lib/rspec/expectations/extensions.rb +0 -2
  100. data/lib/rspec/matchers/be_close.rb +0 -9
  101. data/lib/rspec/matchers/built_in/have.rb +0 -108
  102. data/lib/rspec/matchers/built_in/match_array.rb +0 -45
  103. data/lib/rspec/matchers/built_in/start_and_end_with.rb +0 -48
  104. data/lib/rspec/matchers/compatibility.rb +0 -14
  105. data/lib/rspec/matchers/configuration.rb +0 -66
  106. data/lib/rspec/matchers/extensions/instance_eval_with_args.rb +0 -39
  107. data/lib/rspec/matchers/matcher.rb +0 -299
  108. data/lib/rspec/matchers/method_missing.rb +0 -12
  109. data/lib/rspec/matchers/operator_matcher.rb +0 -84
  110. data/lib/rspec/matchers/pretty.rb +0 -60
  111. data/lib/rspec-expectations.rb +0 -1
  112. data/spec/rspec/expectations/differ_spec.rb +0 -153
  113. data/spec/rspec/expectations/expectation_target_spec.rb +0 -65
  114. data/spec/rspec/expectations/extensions/kernel_spec.rb +0 -67
  115. data/spec/rspec/expectations/fail_with_spec.rb +0 -70
  116. data/spec/rspec/expectations/handler_spec.rb +0 -206
  117. data/spec/rspec/matchers/base_matcher_spec.rb +0 -60
  118. data/spec/rspec/matchers/be_close_spec.rb +0 -22
  119. data/spec/rspec/matchers/be_instance_of_spec.rb +0 -40
  120. data/spec/rspec/matchers/be_kind_of_spec.rb +0 -37
  121. data/spec/rspec/matchers/be_spec.rb +0 -452
  122. data/spec/rspec/matchers/be_within_spec.rb +0 -80
  123. data/spec/rspec/matchers/change_spec.rb +0 -528
  124. data/spec/rspec/matchers/configuration_spec.rb +0 -202
  125. data/spec/rspec/matchers/cover_spec.rb +0 -69
  126. data/spec/rspec/matchers/description_generation_spec.rb +0 -176
  127. data/spec/rspec/matchers/dsl_spec.rb +0 -57
  128. data/spec/rspec/matchers/eq_spec.rb +0 -54
  129. data/spec/rspec/matchers/eql_spec.rb +0 -41
  130. data/spec/rspec/matchers/equal_spec.rb +0 -60
  131. data/spec/rspec/matchers/exist_spec.rb +0 -110
  132. data/spec/rspec/matchers/has_spec.rb +0 -118
  133. data/spec/rspec/matchers/have_spec.rb +0 -461
  134. data/spec/rspec/matchers/include_spec.rb +0 -367
  135. data/spec/rspec/matchers/match_array_spec.rb +0 -124
  136. data/spec/rspec/matchers/match_spec.rb +0 -61
  137. data/spec/rspec/matchers/matcher_spec.rb +0 -434
  138. data/spec/rspec/matchers/matchers_spec.rb +0 -31
  139. data/spec/rspec/matchers/method_missing_spec.rb +0 -24
  140. data/spec/rspec/matchers/operator_matcher_spec.rb +0 -221
  141. data/spec/rspec/matchers/raise_error_spec.rb +0 -344
  142. data/spec/rspec/matchers/respond_to_spec.rb +0 -295
  143. data/spec/rspec/matchers/satisfy_spec.rb +0 -44
  144. data/spec/rspec/matchers/start_with_end_with_spec.rb +0 -182
  145. data/spec/rspec/matchers/throw_symbol_spec.rb +0 -116
  146. data/spec/rspec/matchers/yield_spec.rb +0 -402
  147. data/spec/spec_helper.rb +0 -27
  148. data/spec/support/classes.rb +0 -56
  149. data/spec/support/in_sub_process.rb +0 -31
  150. data/spec/support/matchers.rb +0 -22
  151. data/spec/support/ruby_version.rb +0 -10
  152. data/spec/support/shared_examples.rb +0 -13
data.tar.gz.sig ADDED
Binary file
metadata CHANGED
@@ -1,330 +1,230 @@
1
- --- !ruby/object:Gem::Specification
1
+ --- !ruby/object:Gem::Specification
2
2
  name: rspec-expectations
3
- version: !ruby/object:Gem::Version
4
- hash: 37
5
- prerelease:
6
- segments:
7
- - 2
8
- - 11
9
- - 3
10
- version: 2.11.3
3
+ version: !ruby/object:Gem::Version
4
+ version: 3.11.0
11
5
  platform: ruby
12
- authors:
6
+ authors:
13
7
  - Steven Baker
14
8
  - David Chelimsky
15
- autorequire:
9
+ - Myron Marston
10
+ autorequire:
16
11
  bindir: bin
17
- cert_chain: []
18
-
19
- date: 2012-09-05 00:00:00 Z
20
- dependencies:
21
- - !ruby/object:Gem::Dependency
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: 2022-02-09 00:00:00.000000000 Z
49
+ dependencies:
50
+ - !ruby/object:Gem::Dependency
51
+ name: rspec-support
52
+ requirement: !ruby/object:Gem::Requirement
53
+ requirements:
54
+ - - "~>"
55
+ - !ruby/object:Gem::Version
56
+ version: 3.11.0
57
+ type: :runtime
58
+ prerelease: false
59
+ version_requirements: !ruby/object:Gem::Requirement
60
+ requirements:
61
+ - - "~>"
62
+ - !ruby/object:Gem::Version
63
+ version: 3.11.0
64
+ - !ruby/object:Gem::Dependency
22
65
  name: diff-lcs
66
+ requirement: !ruby/object:Gem::Requirement
67
+ requirements:
68
+ - - ">="
69
+ - !ruby/object:Gem::Version
70
+ version: 1.2.0
71
+ - - "<"
72
+ - !ruby/object:Gem::Version
73
+ version: '2.0'
23
74
  type: :runtime
24
75
  prerelease: false
25
- version_requirements: &id001 !ruby/object:Gem::Requirement
26
- none: false
27
- requirements:
28
- - - ~>
29
- - !ruby/object:Gem::Version
30
- hash: 21
31
- segments:
32
- - 1
33
- - 1
34
- - 3
35
- version: 1.1.3
36
- requirement: *id001
37
- - !ruby/object:Gem::Dependency
38
- name: rake
76
+ version_requirements: !ruby/object:Gem::Requirement
77
+ requirements:
78
+ - - ">="
79
+ - !ruby/object:Gem::Version
80
+ version: 1.2.0
81
+ - - "<"
82
+ - !ruby/object:Gem::Version
83
+ version: '2.0'
84
+ - !ruby/object:Gem::Dependency
85
+ name: aruba
86
+ requirement: !ruby/object:Gem::Requirement
87
+ requirements:
88
+ - - "~>"
89
+ - !ruby/object:Gem::Version
90
+ version: 0.14.10
39
91
  type: :development
40
92
  prerelease: false
41
- version_requirements: &id002 !ruby/object:Gem::Requirement
42
- none: false
43
- requirements:
44
- - - ~>
45
- - !ruby/object:Gem::Version
46
- hash: 63
47
- segments:
48
- - 0
49
- - 9
50
- - 2
51
- version: 0.9.2
52
- requirement: *id002
53
- - !ruby/object:Gem::Dependency
93
+ version_requirements: !ruby/object:Gem::Requirement
94
+ requirements:
95
+ - - "~>"
96
+ - !ruby/object:Gem::Version
97
+ version: 0.14.10
98
+ - !ruby/object:Gem::Dependency
54
99
  name: cucumber
100
+ requirement: !ruby/object:Gem::Requirement
101
+ requirements:
102
+ - - ">="
103
+ - !ruby/object:Gem::Version
104
+ version: '1.3'
55
105
  type: :development
56
106
  prerelease: false
57
- version_requirements: &id003 !ruby/object:Gem::Requirement
58
- none: false
59
- requirements:
60
- - - ~>
61
- - !ruby/object:Gem::Version
62
- hash: 1
63
- segments:
64
- - 1
65
- - 1
66
- - 9
67
- version: 1.1.9
68
- requirement: *id003
69
- - !ruby/object:Gem::Dependency
70
- name: aruba
107
+ version_requirements: !ruby/object:Gem::Requirement
108
+ requirements:
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
+ - - "~>"
117
+ - !ruby/object:Gem::Version
118
+ version: '5.2'
119
+ type: :development
120
+ prerelease: false
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
128
+ requirement: !ruby/object:Gem::Requirement
129
+ requirements:
130
+ - - ">"
131
+ - !ruby/object:Gem::Version
132
+ version: 10.0.0
71
133
  type: :development
72
134
  prerelease: false
73
- version_requirements: &id004 !ruby/object:Gem::Requirement
74
- none: false
75
- requirements:
76
- - - ~>
77
- - !ruby/object:Gem::Version
78
- hash: 25
79
- segments:
80
- - 0
81
- - 4
82
- - 11
83
- version: 0.4.11
84
- requirement: *id004
85
- description: rspec expectations (should[_not] and matchers)
86
- email: rspec-users@rubyforge.org
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
-
89
144
  extensions: []
90
-
91
145
  extra_rdoc_files: []
92
-
93
- files:
94
- - lib/rspec-expectations.rb
146
+ files:
147
+ - ".document"
148
+ - ".yardopts"
149
+ - Changelog.md
150
+ - LICENSE.md
151
+ - README.md
95
152
  - lib/rspec/expectations.rb
96
- - lib/rspec/expectations/deprecation.rb
97
- - lib/rspec/expectations/differ.rb
98
- - lib/rspec/expectations/errors.rb
153
+ - lib/rspec/expectations/block_snippet_extractor.rb
154
+ - lib/rspec/expectations/configuration.rb
99
155
  - lib/rspec/expectations/expectation_target.rb
100
- - lib/rspec/expectations/extensions.rb
101
- - lib/rspec/expectations/extensions/array.rb
102
- - lib/rspec/expectations/extensions/object.rb
103
156
  - lib/rspec/expectations/fail_with.rb
157
+ - lib/rspec/expectations/failure_aggregator.rb
104
158
  - lib/rspec/expectations/handler.rb
159
+ - lib/rspec/expectations/minitest_integration.rb
105
160
  - lib/rspec/expectations/syntax.rb
106
161
  - lib/rspec/expectations/version.rb
107
162
  - lib/rspec/matchers.rb
108
- - lib/rspec/matchers/be_close.rb
163
+ - lib/rspec/matchers/aliased_matcher.rb
109
164
  - lib/rspec/matchers/built_in.rb
165
+ - lib/rspec/matchers/built_in/all.rb
110
166
  - lib/rspec/matchers/built_in/base_matcher.rb
111
167
  - lib/rspec/matchers/built_in/be.rb
168
+ - lib/rspec/matchers/built_in/be_between.rb
112
169
  - lib/rspec/matchers/built_in/be_instance_of.rb
113
170
  - lib/rspec/matchers/built_in/be_kind_of.rb
114
171
  - lib/rspec/matchers/built_in/be_within.rb
115
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
116
176
  - lib/rspec/matchers/built_in/cover.rb
117
177
  - lib/rspec/matchers/built_in/eq.rb
118
178
  - lib/rspec/matchers/built_in/eql.rb
119
179
  - lib/rspec/matchers/built_in/equal.rb
120
180
  - lib/rspec/matchers/built_in/exist.rb
121
181
  - lib/rspec/matchers/built_in/has.rb
122
- - lib/rspec/matchers/built_in/have.rb
182
+ - lib/rspec/matchers/built_in/have_attributes.rb
123
183
  - lib/rspec/matchers/built_in/include.rb
124
184
  - lib/rspec/matchers/built_in/match.rb
125
- - lib/rspec/matchers/built_in/match_array.rb
185
+ - lib/rspec/matchers/built_in/operators.rb
186
+ - lib/rspec/matchers/built_in/output.rb
126
187
  - lib/rspec/matchers/built_in/raise_error.rb
127
188
  - lib/rspec/matchers/built_in/respond_to.rb
128
189
  - lib/rspec/matchers/built_in/satisfy.rb
129
- - lib/rspec/matchers/built_in/start_and_end_with.rb
190
+ - lib/rspec/matchers/built_in/start_or_end_with.rb
130
191
  - lib/rspec/matchers/built_in/throw_symbol.rb
131
192
  - lib/rspec/matchers/built_in/yield.rb
132
- - lib/rspec/matchers/compatibility.rb
133
- - lib/rspec/matchers/configuration.rb
193
+ - lib/rspec/matchers/composable.rb
134
194
  - lib/rspec/matchers/dsl.rb
135
- - lib/rspec/matchers/extensions/instance_eval_with_args.rb
195
+ - lib/rspec/matchers/english_phrasing.rb
196
+ - lib/rspec/matchers/expecteds_for_multiple_diffs.rb
197
+ - lib/rspec/matchers/fail_matchers.rb
136
198
  - lib/rspec/matchers/generated_descriptions.rb
137
- - lib/rspec/matchers/matcher.rb
138
- - lib/rspec/matchers/method_missing.rb
139
- - lib/rspec/matchers/operator_matcher.rb
140
- - lib/rspec/matchers/pretty.rb
141
- - README.md
142
- - License.txt
143
- - Changelog.md
144
- - .yardopts
145
- - .document
146
- - features/README.md
147
- - features/Upgrade.md
148
- - features/built_in_matchers/README.md
149
- - features/built_in_matchers/be.feature
150
- - features/built_in_matchers/be_within.feature
151
- - features/built_in_matchers/cover.feature
152
- - features/built_in_matchers/end_with.feature
153
- - features/built_in_matchers/equality.feature
154
- - features/built_in_matchers/exist.feature
155
- - features/built_in_matchers/expect_change.feature
156
- - features/built_in_matchers/expect_error.feature
157
- - features/built_in_matchers/have.feature
158
- - features/built_in_matchers/include.feature
159
- - features/built_in_matchers/match.feature
160
- - features/built_in_matchers/operators.feature
161
- - features/built_in_matchers/predicates.feature
162
- - features/built_in_matchers/respond_to.feature
163
- - features/built_in_matchers/satisfy.feature
164
- - features/built_in_matchers/start_with.feature
165
- - features/built_in_matchers/throw_symbol.feature
166
- - features/built_in_matchers/types.feature
167
- - features/built_in_matchers/yield.feature
168
- - features/custom_matchers/access_running_example.feature
169
- - features/custom_matchers/define_diffable_matcher.feature
170
- - features/custom_matchers/define_matcher.feature
171
- - features/custom_matchers/define_matcher_outside_rspec.feature
172
- - features/custom_matchers/define_matcher_with_fluent_interface.feature
173
- - features/customized_message.feature
174
- - features/diffing.feature
175
- - features/implicit_docstrings.feature
176
- - features/step_definitions/additional_cli_steps.rb
177
- - features/support/env.rb
178
- - features/syntax_configuration.feature
179
- - features/test_frameworks/test_unit.feature
180
- - spec/rspec/expectations/differ_spec.rb
181
- - spec/rspec/expectations/expectation_target_spec.rb
182
- - spec/rspec/expectations/extensions/kernel_spec.rb
183
- - spec/rspec/expectations/fail_with_spec.rb
184
- - spec/rspec/expectations/handler_spec.rb
185
- - spec/rspec/matchers/base_matcher_spec.rb
186
- - spec/rspec/matchers/be_close_spec.rb
187
- - spec/rspec/matchers/be_instance_of_spec.rb
188
- - spec/rspec/matchers/be_kind_of_spec.rb
189
- - spec/rspec/matchers/be_spec.rb
190
- - spec/rspec/matchers/be_within_spec.rb
191
- - spec/rspec/matchers/change_spec.rb
192
- - spec/rspec/matchers/configuration_spec.rb
193
- - spec/rspec/matchers/cover_spec.rb
194
- - spec/rspec/matchers/description_generation_spec.rb
195
- - spec/rspec/matchers/dsl_spec.rb
196
- - spec/rspec/matchers/eq_spec.rb
197
- - spec/rspec/matchers/eql_spec.rb
198
- - spec/rspec/matchers/equal_spec.rb
199
- - spec/rspec/matchers/exist_spec.rb
200
- - spec/rspec/matchers/has_spec.rb
201
- - spec/rspec/matchers/have_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
222
- licenses:
199
+ - lib/rspec/matchers/matcher_delegator.rb
200
+ - lib/rspec/matchers/matcher_protocol.rb
201
+ homepage: https://github.com/rspec/rspec-expectations
202
+ licenses:
223
203
  - MIT
224
- post_install_message:
225
- rdoc_options:
226
- - --charset=UTF-8
227
- require_paths:
204
+ metadata:
205
+ bug_tracker_uri: https://github.com/rspec/rspec-expectations/issues
206
+ changelog_uri: https://github.com/rspec/rspec-expectations/blob/v3.11.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:
211
+ rdoc_options:
212
+ - "--charset=UTF-8"
213
+ require_paths:
228
214
  - lib
229
- required_ruby_version: !ruby/object:Gem::Requirement
230
- none: false
231
- requirements:
215
+ required_ruby_version: !ruby/object:Gem::Requirement
216
+ requirements:
232
217
  - - ">="
233
- - !ruby/object:Gem::Version
234
- hash: 3
235
- segments:
236
- - 0
237
- version: "0"
238
- required_rubygems_version: !ruby/object:Gem::Requirement
239
- none: false
240
- requirements:
218
+ - !ruby/object:Gem::Version
219
+ version: 1.8.7
220
+ required_rubygems_version: !ruby/object:Gem::Requirement
221
+ requirements:
241
222
  - - ">="
242
- - !ruby/object:Gem::Version
243
- hash: 3
244
- segments:
245
- - 0
246
- version: "0"
223
+ - !ruby/object:Gem::Version
224
+ version: '0'
247
225
  requirements: []
248
-
249
- rubyforge_project: rspec
250
- rubygems_version: 1.8.6
251
- signing_key:
252
- specification_version: 3
253
- summary: rspec-expectations-2.11.3
254
- test_files:
255
- - features/README.md
256
- - features/Upgrade.md
257
- - features/built_in_matchers/README.md
258
- - features/built_in_matchers/be.feature
259
- - features/built_in_matchers/be_within.feature
260
- - features/built_in_matchers/cover.feature
261
- - features/built_in_matchers/end_with.feature
262
- - features/built_in_matchers/equality.feature
263
- - features/built_in_matchers/exist.feature
264
- - features/built_in_matchers/expect_change.feature
265
- - features/built_in_matchers/expect_error.feature
266
- - features/built_in_matchers/have.feature
267
- - features/built_in_matchers/include.feature
268
- - features/built_in_matchers/match.feature
269
- - features/built_in_matchers/operators.feature
270
- - features/built_in_matchers/predicates.feature
271
- - features/built_in_matchers/respond_to.feature
272
- - features/built_in_matchers/satisfy.feature
273
- - features/built_in_matchers/start_with.feature
274
- - features/built_in_matchers/throw_symbol.feature
275
- - features/built_in_matchers/types.feature
276
- - features/built_in_matchers/yield.feature
277
- - features/custom_matchers/access_running_example.feature
278
- - features/custom_matchers/define_diffable_matcher.feature
279
- - features/custom_matchers/define_matcher.feature
280
- - features/custom_matchers/define_matcher_outside_rspec.feature
281
- - features/custom_matchers/define_matcher_with_fluent_interface.feature
282
- - features/customized_message.feature
283
- - features/diffing.feature
284
- - features/implicit_docstrings.feature
285
- - features/step_definitions/additional_cli_steps.rb
286
- - features/support/env.rb
287
- - features/syntax_configuration.feature
288
- - features/test_frameworks/test_unit.feature
289
- - spec/rspec/expectations/differ_spec.rb
290
- - spec/rspec/expectations/expectation_target_spec.rb
291
- - spec/rspec/expectations/extensions/kernel_spec.rb
292
- - spec/rspec/expectations/fail_with_spec.rb
293
- - spec/rspec/expectations/handler_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_spec.rb
312
- - spec/rspec/matchers/match_array_spec.rb
313
- - spec/rspec/matchers/match_spec.rb
314
- - spec/rspec/matchers/matcher_spec.rb
315
- - spec/rspec/matchers/matchers_spec.rb
316
- - spec/rspec/matchers/method_missing_spec.rb
317
- - spec/rspec/matchers/operator_matcher_spec.rb
318
- - spec/rspec/matchers/raise_error_spec.rb
319
- - spec/rspec/matchers/respond_to_spec.rb
320
- - spec/rspec/matchers/satisfy_spec.rb
321
- - spec/rspec/matchers/start_with_end_with_spec.rb
322
- - spec/rspec/matchers/throw_symbol_spec.rb
323
- - spec/rspec/matchers/yield_spec.rb
324
- - spec/spec_helper.rb
325
- - spec/support/classes.rb
326
- - spec/support/in_sub_process.rb
327
- - spec/support/matchers.rb
328
- - spec/support/ruby_version.rb
329
- - spec/support/shared_examples.rb
330
- has_rdoc:
226
+ rubygems_version: 3.3.3
227
+ signing_key:
228
+ specification_version: 4
229
+ summary: rspec-expectations-3.11.0
230
+ test_files: []
metadata.gz.sig ADDED
Binary file
data/features/README.md DELETED
@@ -1,49 +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
- Account.new.balance.should eq(Money.new(0))
6
- end
7
- end
8
-
9
- ## Basic structure
10
-
11
- The basic structure of an rspec expectation is:
12
-
13
- actual.should matcher(expected)
14
- actual.should_not matcher(expected)
15
-
16
- ## `should` and `should_not`
17
-
18
- `rspec-expectations` adds `should` and `should_not` to every object in
19
- the system. These methods each accept a matcher as an argument. This allows
20
- each matcher to work in a positive or negative mode:
21
-
22
- 5.should eq(5)
23
- 5.should_not eq(4)
24
-
25
- ## What is a matcher?
26
-
27
- A Matcher is any object that responds to the following methods:
28
-
29
- matches?(actual)
30
- failure_message_for_should
31
-
32
- These methods are also part of the matcher protocol, but are optional:
33
-
34
- does_not_match?(actual)
35
- failure_message_for_should_not
36
- description
37
-
38
- RSpec ships with a number of built-in matchers and a DSL for writing custom
39
- matchers.
40
-
41
- ## Issues
42
-
43
- The documentation for rspec-expectations is a work in progress. We'll be adding
44
- Cucumber features over time, and clarifying existing ones. If you have
45
- specific features you'd like to see added, find the existing documentation
46
- incomplete or confusing, or, better yet, wish to write a missing Cucumber
47
- feature yourself, please [submit an
48
- issue](http://github.com/rspec/rspec-expectations/issues) or a [pull
49
- 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