serverspec-extra-types 0.1.3 → 0.1.4

Sign up to get free protection for your applications and to get access to all the features.
Files changed (63) hide show
  1. checksums.yaml +4 -4
  2. data/.rubocop.yml +3 -1
  3. data/Gemfile +2 -0
  4. data/Rakefile +2 -0
  5. data/bin/console +1 -0
  6. data/lib/serverspec_extra_types/helpers/properties.rb +2 -0
  7. data/lib/serverspec_extra_types/matchers/be_a_manager_node.rb +2 -0
  8. data/lib/serverspec_extra_types/matchers/be_a_worker_node.rb +2 -0
  9. data/lib/serverspec_extra_types/matchers/be_active.rb +2 -0
  10. data/lib/serverspec_extra_types/matchers/configure_queue.rb +2 -0
  11. data/lib/serverspec_extra_types/matchers/have_count.rb +2 -0
  12. data/lib/serverspec_extra_types/matchers/have_domain_name.rb +2 -0
  13. data/lib/serverspec_extra_types/matchers/have_engine_version.rb +2 -0
  14. data/lib/serverspec_extra_types/matchers/have_environment_variable.rb +2 -0
  15. data/lib/serverspec_extra_types/matchers/have_ha_mode.rb +2 -0
  16. data/lib/serverspec_extra_types/matchers/have_ha_nodes.rb +2 -0
  17. data/lib/serverspec_extra_types/matchers/have_ha_sync_mode.rb +2 -0
  18. data/lib/serverspec_extra_types/matchers/have_host.rb +2 -0
  19. data/lib/serverspec_extra_types/matchers/have_hostname.rb +2 -0
  20. data/lib/serverspec_extra_types/matchers/have_image.rb +2 -0
  21. data/lib/serverspec_extra_types/matchers/have_image_sha.rb +2 -0
  22. data/lib/serverspec_extra_types/matchers/have_label.rb +4 -2
  23. data/lib/serverspec_extra_types/matchers/have_mount.rb +2 -0
  24. data/lib/serverspec_extra_types/matchers/have_network.rb +2 -0
  25. data/lib/serverspec_extra_types/matchers/have_placement_constraint.rb +2 -0
  26. data/lib/serverspec_extra_types/matchers/have_replica_count.rb +2 -0
  27. data/lib/serverspec_extra_types/matchers/have_restart_limit.rb +2 -0
  28. data/lib/serverspec_extra_types/matchers/have_restart_policy.rb +2 -0
  29. data/lib/serverspec_extra_types/matchers/have_user.rb +2 -0
  30. data/lib/serverspec_extra_types/matchers/have_vhost.rb +2 -0
  31. data/lib/serverspec_extra_types/matchers/http_1xx.rb +109 -0
  32. data/lib/serverspec_extra_types/matchers/http_2xx.rb +361 -0
  33. data/lib/serverspec_extra_types/matchers/http_3xx.rb +289 -0
  34. data/lib/serverspec_extra_types/matchers/http_4xx.rb +1081 -0
  35. data/lib/serverspec_extra_types/matchers/http_5xx.rb +433 -0
  36. data/lib/serverspec_extra_types/matchers/include_regex.rb +2 -0
  37. data/lib/serverspec_extra_types/matchers/map_port.rb +2 -0
  38. data/lib/serverspec_extra_types/matchers/mirror_all.rb +2 -0
  39. data/lib/serverspec_extra_types/matchers/publish_all_ports.rb +2 -0
  40. data/lib/serverspec_extra_types/matchers/read_from_queue.rb +2 -0
  41. data/lib/serverspec_extra_types/matchers/url_matchers.rb +7 -0
  42. data/lib/serverspec_extra_types/matchers/write_to_queue.rb +2 -0
  43. data/lib/serverspec_extra_types/matchers.rb +4 -0
  44. data/lib/serverspec_extra_types/types/api_base.rb +2 -0
  45. data/lib/serverspec_extra_types/types/consul_base.rb +2 -0
  46. data/lib/serverspec_extra_types/types/consul_node.rb +2 -0
  47. data/lib/serverspec_extra_types/types/consul_node_list.rb +2 -0
  48. data/lib/serverspec_extra_types/types/consul_service.rb +2 -0
  49. data/lib/serverspec_extra_types/types/consul_service_list.rb +2 -0
  50. data/lib/serverspec_extra_types/types/curl.rb +69 -0
  51. data/lib/serverspec_extra_types/types/docker_container.rb +2 -0
  52. data/lib/serverspec_extra_types/types/docker_network.rb +2 -2
  53. data/lib/serverspec_extra_types/types/docker_node.rb +2 -0
  54. data/lib/serverspec_extra_types/types/docker_service.rb +2 -0
  55. data/lib/serverspec_extra_types/types/rabbitmq_base.rb +2 -0
  56. data/lib/serverspec_extra_types/types/rabbitmq_node_list.rb +2 -0
  57. data/lib/serverspec_extra_types/types/rabbitmq_user_permission.rb +2 -0
  58. data/lib/serverspec_extra_types/types/rabbitmq_vhost_list.rb +2 -0
  59. data/lib/serverspec_extra_types/types/rabbitmq_vhost_policy.rb +2 -0
  60. data/lib/serverspec_extra_types/types.rb +4 -1
  61. data/lib/serverspec_extra_types/version.rb +3 -1
  62. data/lib/serverspec_extra_types.rb +2 -0
  63. metadata +10 -3
@@ -0,0 +1,289 @@
1
+ # frozen_string_literal: true
2
+
3
+ RSpec::Matchers.define :respond_with_300 do
4
+ match do |actual|
5
+ actual.response_code == 300
6
+ end
7
+ failure_message do |actual|
8
+ "expected #{actual} to respond with 300 was #{actual.response_code}"
9
+ end
10
+ end
11
+
12
+ RSpec::Matchers.define :respond_with_MULTIPLE_CHOICES do
13
+ match do |actual|
14
+ actual.response_code == 300
15
+ end
16
+ failure_message do |actual|
17
+ "expected #{actual} to respond with 300 was #{actual.response_code}"
18
+ end
19
+ end
20
+
21
+ RSpec::Matchers.define :respond_with_multiple_choices do
22
+ match do |actual|
23
+ actual.response_code == 300
24
+ end
25
+ failure_message do |actual|
26
+ "expected #{actual} to respond with 300 was #{actual.response_code}"
27
+ end
28
+ end
29
+
30
+ RSpec::Matchers.define :be_multiple_choices do
31
+ match do |actual|
32
+ actual.response_code == 300
33
+ end
34
+ failure_message do |actual|
35
+ "expected #{actual} to respond with 300 was #{actual.response_code}"
36
+ end
37
+ end
38
+
39
+ RSpec::Matchers.define :respond_with_301 do
40
+ match do |actual|
41
+ actual.response_code == 301
42
+ end
43
+ failure_message do |actual|
44
+ "expected #{actual} to respond with 301 was #{actual.response_code}"
45
+ end
46
+ end
47
+
48
+ RSpec::Matchers.define :respond_with_MOVED_PERMANENTLY do
49
+ match do |actual|
50
+ actual.response_code == 301
51
+ end
52
+ failure_message do |actual|
53
+ "expected #{actual} to respond with 301 was #{actual.response_code}"
54
+ end
55
+ end
56
+
57
+ RSpec::Matchers.define :respond_with_moved_permanently do
58
+ match do |actual|
59
+ actual.response_code == 301
60
+ end
61
+ failure_message do |actual|
62
+ "expected #{actual} to respond with 301 was #{actual.response_code}"
63
+ end
64
+ end
65
+
66
+ RSpec::Matchers.define :be_moved_permanently do
67
+ match do |actual|
68
+ actual.response_code == 301
69
+ end
70
+ failure_message do |actual|
71
+ "expected #{actual} to respond with 301 was #{actual.response_code}"
72
+ end
73
+ end
74
+
75
+ RSpec::Matchers.define :respond_with_302 do
76
+ match do |actual|
77
+ actual.response_code == 302
78
+ end
79
+ failure_message do |actual|
80
+ "expected #{actual} to respond with 302 was #{actual.response_code}"
81
+ end
82
+ end
83
+
84
+ RSpec::Matchers.define :respond_with_FOUND do
85
+ match do |actual|
86
+ actual.response_code == 302
87
+ end
88
+ failure_message do |actual|
89
+ "expected #{actual} to respond with 302 was #{actual.response_code}"
90
+ end
91
+ end
92
+
93
+ RSpec::Matchers.define :respond_with_found do
94
+ match do |actual|
95
+ actual.response_code == 302
96
+ end
97
+ failure_message do |actual|
98
+ "expected #{actual} to respond with 302 was #{actual.response_code}"
99
+ end
100
+ end
101
+
102
+ RSpec::Matchers.define :be_found do
103
+ match do |actual|
104
+ actual.response_code == 302
105
+ end
106
+ failure_message do |actual|
107
+ "expected #{actual} to respond with 302 was #{actual.response_code}"
108
+ end
109
+ end
110
+
111
+ RSpec::Matchers.define :respond_with_303 do
112
+ match do |actual|
113
+ actual.response_code == 303
114
+ end
115
+ failure_message do |actual|
116
+ "expected #{actual} to respond with 303 was #{actual.response_code}"
117
+ end
118
+ end
119
+
120
+ RSpec::Matchers.define :respond_with_SEE_OTHER do
121
+ match do |actual|
122
+ actual.response_code == 303
123
+ end
124
+ failure_message do |actual|
125
+ "expected #{actual} to respond with 303 was #{actual.response_code}"
126
+ end
127
+ end
128
+
129
+ RSpec::Matchers.define :respond_with_see_other do
130
+ match do |actual|
131
+ actual.response_code == 303
132
+ end
133
+ failure_message do |actual|
134
+ "expected #{actual} to respond with 303 was #{actual.response_code}"
135
+ end
136
+ end
137
+
138
+ RSpec::Matchers.define :be_see_other do
139
+ match do |actual|
140
+ actual.response_code == 303
141
+ end
142
+ failure_message do |actual|
143
+ "expected #{actual} to respond with 303 was #{actual.response_code}"
144
+ end
145
+ end
146
+
147
+ RSpec::Matchers.define :respond_with_304 do
148
+ match do |actual|
149
+ actual.response_code == 304
150
+ end
151
+ failure_message do |actual|
152
+ "expected #{actual} to respond with 304 was #{actual.response_code}"
153
+ end
154
+ end
155
+
156
+ RSpec::Matchers.define :respond_with_NOT_MODIFIED do
157
+ match do |actual|
158
+ actual.response_code == 304
159
+ end
160
+ failure_message do |actual|
161
+ "expected #{actual} to respond with 304 was #{actual.response_code}"
162
+ end
163
+ end
164
+
165
+ RSpec::Matchers.define :respond_with_not_modified do
166
+ match do |actual|
167
+ actual.response_code == 304
168
+ end
169
+ failure_message do |actual|
170
+ "expected #{actual} to respond with 304 was #{actual.response_code}"
171
+ end
172
+ end
173
+
174
+ RSpec::Matchers.define :be_not_modified do
175
+ match do |actual|
176
+ actual.response_code == 304
177
+ end
178
+ failure_message do |actual|
179
+ "expected #{actual} to respond with 304 was #{actual.response_code}"
180
+ end
181
+ end
182
+
183
+ RSpec::Matchers.define :respond_with_305 do
184
+ match do |actual|
185
+ actual.response_code == 305
186
+ end
187
+ failure_message do |actual|
188
+ "expected #{actual} to respond with 305 was #{actual.response_code}"
189
+ end
190
+ end
191
+
192
+ RSpec::Matchers.define :respond_with_USE_PROXY do
193
+ match do |actual|
194
+ actual.response_code == 305
195
+ end
196
+ failure_message do |actual|
197
+ "expected #{actual} to respond with 305 was #{actual.response_code}"
198
+ end
199
+ end
200
+
201
+ RSpec::Matchers.define :respond_with_use_proxy do
202
+ match do |actual|
203
+ actual.response_code == 305
204
+ end
205
+ failure_message do |actual|
206
+ "expected #{actual} to respond with 305 was #{actual.response_code}"
207
+ end
208
+ end
209
+
210
+ RSpec::Matchers.define :be_use_proxy do
211
+ match do |actual|
212
+ actual.response_code == 305
213
+ end
214
+ failure_message do |actual|
215
+ "expected #{actual} to respond with 305 was #{actual.response_code}"
216
+ end
217
+ end
218
+
219
+ RSpec::Matchers.define :respond_with_307 do
220
+ match do |actual|
221
+ actual.response_code == 307
222
+ end
223
+ failure_message do |actual|
224
+ "expected #{actual} to respond with 307 was #{actual.response_code}"
225
+ end
226
+ end
227
+
228
+ RSpec::Matchers.define :respond_with_TEMPORARY_REDIRECT do
229
+ match do |actual|
230
+ actual.response_code == 307
231
+ end
232
+ failure_message do |actual|
233
+ "expected #{actual} to respond with 307 was #{actual.response_code}"
234
+ end
235
+ end
236
+
237
+ RSpec::Matchers.define :respond_with_temporary_redirect do
238
+ match do |actual|
239
+ actual.response_code == 307
240
+ end
241
+ failure_message do |actual|
242
+ "expected #{actual} to respond with 307 was #{actual.response_code}"
243
+ end
244
+ end
245
+
246
+ RSpec::Matchers.define :be_temporary_redirect do
247
+ match do |actual|
248
+ actual.response_code == 307
249
+ end
250
+ failure_message do |actual|
251
+ "expected #{actual} to respond with 307 was #{actual.response_code}"
252
+ end
253
+ end
254
+
255
+ RSpec::Matchers.define :respond_with_308 do
256
+ match do |actual|
257
+ actual.response_code == 308
258
+ end
259
+ failure_message do |actual|
260
+ "expected #{actual} to respond with 308 was #{actual.response_code}"
261
+ end
262
+ end
263
+
264
+ RSpec::Matchers.define :respond_with_PERMANENT_REDIRECT do
265
+ match do |actual|
266
+ actual.response_code == 308
267
+ end
268
+ failure_message do |actual|
269
+ "expected #{actual} to respond with 308 was #{actual.response_code}"
270
+ end
271
+ end
272
+
273
+ RSpec::Matchers.define :respond_with_permanent_redirect do
274
+ match do |actual|
275
+ actual.response_code == 308
276
+ end
277
+ failure_message do |actual|
278
+ "expected #{actual} to respond with 308 was #{actual.response_code}"
279
+ end
280
+ end
281
+
282
+ RSpec::Matchers.define :be_permanent_redirect do
283
+ match do |actual|
284
+ actual.response_code == 308
285
+ end
286
+ failure_message do |actual|
287
+ "expected #{actual} to respond with 308 was #{actual.response_code}"
288
+ end
289
+ end
@@ -0,0 +1,1081 @@
1
+ # frozen_string_literal: true
2
+
3
+ RSpec::Matchers.define :respond_with_400 do
4
+ match do |actual|
5
+ actual.response_code == 400
6
+ end
7
+ failure_message do |actual|
8
+ "expected #{actual} to respond with 400 was #{actual.response_code}"
9
+ end
10
+ end
11
+
12
+ RSpec::Matchers.define :respond_with_BAD_REQUEST do
13
+ match do |actual|
14
+ actual.response_code == 400
15
+ end
16
+ failure_message do |actual|
17
+ "expected #{actual} to respond with 400 was #{actual.response_code}"
18
+ end
19
+ end
20
+
21
+ RSpec::Matchers.define :respond_with_bad_request do
22
+ match do |actual|
23
+ actual.response_code == 400
24
+ end
25
+ failure_message do |actual|
26
+ "expected #{actual} to respond with 400 was #{actual.response_code}"
27
+ end
28
+ end
29
+
30
+ RSpec::Matchers.define :be_bad_request do
31
+ match do |actual|
32
+ actual.response_code == 400
33
+ end
34
+ failure_message do |actual|
35
+ "expected #{actual} to respond with 400 was #{actual.response_code}"
36
+ end
37
+ end
38
+
39
+ RSpec::Matchers.define :respond_with_401 do
40
+ match do |actual|
41
+ actual.response_code == 401
42
+ end
43
+ failure_message do |actual|
44
+ "expected #{actual} to respond with 401 was #{actual.response_code}"
45
+ end
46
+ end
47
+
48
+ RSpec::Matchers.define :respond_with_UNAUTHORIZED do
49
+ match do |actual|
50
+ actual.response_code == 401
51
+ end
52
+ failure_message do |actual|
53
+ "expected #{actual} to respond with 401 was #{actual.response_code}"
54
+ end
55
+ end
56
+
57
+ RSpec::Matchers.define :respond_with_unauthorized do
58
+ match do |actual|
59
+ actual.response_code == 401
60
+ end
61
+ failure_message do |actual|
62
+ "expected #{actual} to respond with 401 was #{actual.response_code}"
63
+ end
64
+ end
65
+
66
+ RSpec::Matchers.define :be_unauthorized do
67
+ match do |actual|
68
+ actual.response_code == 401
69
+ end
70
+ failure_message do |actual|
71
+ "expected #{actual} to respond with 401 was #{actual.response_code}"
72
+ end
73
+ end
74
+
75
+ RSpec::Matchers.define :respond_with_402 do
76
+ match do |actual|
77
+ actual.response_code == 402
78
+ end
79
+ failure_message do |actual|
80
+ "expected #{actual} to respond with 402 was #{actual.response_code}"
81
+ end
82
+ end
83
+
84
+ RSpec::Matchers.define :respond_with_PAYMENT_REQUIRED do
85
+ match do |actual|
86
+ actual.response_code == 402
87
+ end
88
+ failure_message do |actual|
89
+ "expected #{actual} to respond with 402 was #{actual.response_code}"
90
+ end
91
+ end
92
+
93
+ RSpec::Matchers.define :respond_with_payment_required do
94
+ match do |actual|
95
+ actual.response_code == 402
96
+ end
97
+ failure_message do |actual|
98
+ "expected #{actual} to respond with 402 was #{actual.response_code}"
99
+ end
100
+ end
101
+
102
+ RSpec::Matchers.define :be_payment_required do
103
+ match do |actual|
104
+ actual.response_code == 402
105
+ end
106
+ failure_message do |actual|
107
+ "expected #{actual} to respond with 402 was #{actual.response_code}"
108
+ end
109
+ end
110
+
111
+ RSpec::Matchers.define :respond_with_403 do
112
+ match do |actual|
113
+ actual.response_code == 403
114
+ end
115
+ failure_message do |actual|
116
+ "expected #{actual} to respond with 403 was #{actual.response_code}"
117
+ end
118
+ end
119
+
120
+ RSpec::Matchers.define :respond_with_FORBIDDEN do
121
+ match do |actual|
122
+ actual.response_code == 403
123
+ end
124
+ failure_message do |actual|
125
+ "expected #{actual} to respond with 403 was #{actual.response_code}"
126
+ end
127
+ end
128
+
129
+ RSpec::Matchers.define :respond_with_forbidden do
130
+ match do |actual|
131
+ actual.response_code == 403
132
+ end
133
+ failure_message do |actual|
134
+ "expected #{actual} to respond with 403 was #{actual.response_code}"
135
+ end
136
+ end
137
+
138
+ RSpec::Matchers.define :be_forbidden do
139
+ match do |actual|
140
+ actual.response_code == 403
141
+ end
142
+ failure_message do |actual|
143
+ "expected #{actual} to respond with 403 was #{actual.response_code}"
144
+ end
145
+ end
146
+
147
+ RSpec::Matchers.define :respond_with_404 do
148
+ match do |actual|
149
+ actual.response_code == 404
150
+ end
151
+ failure_message do |actual|
152
+ "expected #{actual} to respond with 404 was #{actual.response_code}"
153
+ end
154
+ end
155
+
156
+ RSpec::Matchers.define :respond_with_NOT_FOUND do
157
+ match do |actual|
158
+ actual.response_code == 404
159
+ end
160
+ failure_message do |actual|
161
+ "expected #{actual} to respond with 404 was #{actual.response_code}"
162
+ end
163
+ end
164
+
165
+ RSpec::Matchers.define :respond_with_not_found do
166
+ match do |actual|
167
+ actual.response_code == 404
168
+ end
169
+ failure_message do |actual|
170
+ "expected #{actual} to respond with 404 was #{actual.response_code}"
171
+ end
172
+ end
173
+
174
+ RSpec::Matchers.define :be_not_found do
175
+ match do |actual|
176
+ actual.response_code == 404
177
+ end
178
+ failure_message do |actual|
179
+ "expected #{actual} to respond with 404 was #{actual.response_code}"
180
+ end
181
+ end
182
+
183
+ RSpec::Matchers.define :respond_with_405 do
184
+ match do |actual|
185
+ actual.response_code == 405
186
+ end
187
+ failure_message do |actual|
188
+ "expected #{actual} to respond with 405 was #{actual.response_code}"
189
+ end
190
+ end
191
+
192
+ RSpec::Matchers.define :respond_with_METHOD_NOT_ALLOWED do
193
+ match do |actual|
194
+ actual.response_code == 405
195
+ end
196
+ failure_message do |actual|
197
+ "expected #{actual} to respond with 405 was #{actual.response_code}"
198
+ end
199
+ end
200
+
201
+ RSpec::Matchers.define :respond_with_method_not_allowed do
202
+ match do |actual|
203
+ actual.response_code == 405
204
+ end
205
+ failure_message do |actual|
206
+ "expected #{actual} to respond with 405 was #{actual.response_code}"
207
+ end
208
+ end
209
+
210
+ RSpec::Matchers.define :be_method_not_allowed do
211
+ match do |actual|
212
+ actual.response_code == 405
213
+ end
214
+ failure_message do |actual|
215
+ "expected #{actual} to respond with 405 was #{actual.response_code}"
216
+ end
217
+ end
218
+
219
+ RSpec::Matchers.define :respond_with_406 do
220
+ match do |actual|
221
+ actual.response_code == 406
222
+ end
223
+ failure_message do |actual|
224
+ "expected #{actual} to respond with 406 was #{actual.response_code}"
225
+ end
226
+ end
227
+
228
+ RSpec::Matchers.define :respond_with_NOT_ACCEPTABLE do
229
+ match do |actual|
230
+ actual.response_code == 406
231
+ end
232
+ failure_message do |actual|
233
+ "expected #{actual} to respond with 406 was #{actual.response_code}"
234
+ end
235
+ end
236
+
237
+ RSpec::Matchers.define :respond_with_not_acceptable do
238
+ match do |actual|
239
+ actual.response_code == 406
240
+ end
241
+ failure_message do |actual|
242
+ "expected #{actual} to respond with 406 was #{actual.response_code}"
243
+ end
244
+ end
245
+
246
+ RSpec::Matchers.define :be_not_acceptable do
247
+ match do |actual|
248
+ actual.response_code == 406
249
+ end
250
+ failure_message do |actual|
251
+ "expected #{actual} to respond with 406 was #{actual.response_code}"
252
+ end
253
+ end
254
+
255
+ RSpec::Matchers.define :respond_with_407 do
256
+ match do |actual|
257
+ actual.response_code == 407
258
+ end
259
+ failure_message do |actual|
260
+ "expected #{actual} to respond with 407 was #{actual.response_code}"
261
+ end
262
+ end
263
+
264
+ RSpec::Matchers.define :respond_with_PROXY_AUTHENTICATION_REQUIRED do
265
+ match do |actual|
266
+ actual.response_code == 407
267
+ end
268
+ failure_message do |actual|
269
+ "expected #{actual} to respond with 407 was #{actual.response_code}"
270
+ end
271
+ end
272
+
273
+ RSpec::Matchers.define :respond_with_proxy_authentication_required do
274
+ match do |actual|
275
+ actual.response_code == 407
276
+ end
277
+ failure_message do |actual|
278
+ "expected #{actual} to respond with 407 was #{actual.response_code}"
279
+ end
280
+ end
281
+
282
+ RSpec::Matchers.define :be_proxy_authentication_required do
283
+ match do |actual|
284
+ actual.response_code == 407
285
+ end
286
+ failure_message do |actual|
287
+ "expected #{actual} to respond with 407 was #{actual.response_code}"
288
+ end
289
+ end
290
+
291
+ RSpec::Matchers.define :respond_with_408 do
292
+ match do |actual|
293
+ actual.response_code == 408
294
+ end
295
+ failure_message do |actual|
296
+ "expected #{actual} to respond with 408 was #{actual.response_code}"
297
+ end
298
+ end
299
+
300
+ RSpec::Matchers.define :respond_with_REQUEST_TIMEOUT do
301
+ match do |actual|
302
+ actual.response_code == 408
303
+ end
304
+ failure_message do |actual|
305
+ "expected #{actual} to respond with 408 was #{actual.response_code}"
306
+ end
307
+ end
308
+
309
+ RSpec::Matchers.define :respond_with_request_timeout do
310
+ match do |actual|
311
+ actual.response_code == 408
312
+ end
313
+ failure_message do |actual|
314
+ "expected #{actual} to respond with 408 was #{actual.response_code}"
315
+ end
316
+ end
317
+
318
+ RSpec::Matchers.define :be_request_timeout do
319
+ match do |actual|
320
+ actual.response_code == 408
321
+ end
322
+ failure_message do |actual|
323
+ "expected #{actual} to respond with 408 was #{actual.response_code}"
324
+ end
325
+ end
326
+
327
+ RSpec::Matchers.define :respond_with_409 do
328
+ match do |actual|
329
+ actual.response_code == 409
330
+ end
331
+ failure_message do |actual|
332
+ "expected #{actual} to respond with 409 was #{actual.response_code}"
333
+ end
334
+ end
335
+
336
+ RSpec::Matchers.define :respond_with_CONFLICT do
337
+ match do |actual|
338
+ actual.response_code == 409
339
+ end
340
+ failure_message do |actual|
341
+ "expected #{actual} to respond with 409 was #{actual.response_code}"
342
+ end
343
+ end
344
+
345
+ RSpec::Matchers.define :respond_with_conflict do
346
+ match do |actual|
347
+ actual.response_code == 409
348
+ end
349
+ failure_message do |actual|
350
+ "expected #{actual} to respond with 409 was #{actual.response_code}"
351
+ end
352
+ end
353
+
354
+ RSpec::Matchers.define :be_conflict do
355
+ match do |actual|
356
+ actual.response_code == 409
357
+ end
358
+ failure_message do |actual|
359
+ "expected #{actual} to respond with 409 was #{actual.response_code}"
360
+ end
361
+ end
362
+
363
+ RSpec::Matchers.define :respond_with_410 do
364
+ match do |actual|
365
+ actual.response_code == 410
366
+ end
367
+ failure_message do |actual|
368
+ "expected #{actual} to respond with 410 was #{actual.response_code}"
369
+ end
370
+ end
371
+
372
+ RSpec::Matchers.define :respond_with_GONE do
373
+ match do |actual|
374
+ actual.response_code == 410
375
+ end
376
+ failure_message do |actual|
377
+ "expected #{actual} to respond with 410 was #{actual.response_code}"
378
+ end
379
+ end
380
+
381
+ RSpec::Matchers.define :respond_with_gone do
382
+ match do |actual|
383
+ actual.response_code == 410
384
+ end
385
+ failure_message do |actual|
386
+ "expected #{actual} to respond with 410 was #{actual.response_code}"
387
+ end
388
+ end
389
+
390
+ RSpec::Matchers.define :be_gone do
391
+ match do |actual|
392
+ actual.response_code == 410
393
+ end
394
+ failure_message do |actual|
395
+ "expected #{actual} to respond with 410 was #{actual.response_code}"
396
+ end
397
+ end
398
+
399
+ RSpec::Matchers.define :respond_with_411 do
400
+ match do |actual|
401
+ actual.response_code == 411
402
+ end
403
+ failure_message do |actual|
404
+ "expected #{actual} to respond with 411 was #{actual.response_code}"
405
+ end
406
+ end
407
+
408
+ RSpec::Matchers.define :respond_with_LENGTH_REQUIRED do
409
+ match do |actual|
410
+ actual.response_code == 411
411
+ end
412
+ failure_message do |actual|
413
+ "expected #{actual} to respond with 411 was #{actual.response_code}"
414
+ end
415
+ end
416
+
417
+ RSpec::Matchers.define :respond_with_length_required do
418
+ match do |actual|
419
+ actual.response_code == 411
420
+ end
421
+ failure_message do |actual|
422
+ "expected #{actual} to respond with 411 was #{actual.response_code}"
423
+ end
424
+ end
425
+
426
+ RSpec::Matchers.define :be_length_required do
427
+ match do |actual|
428
+ actual.response_code == 411
429
+ end
430
+ failure_message do |actual|
431
+ "expected #{actual} to respond with 411 was #{actual.response_code}"
432
+ end
433
+ end
434
+
435
+ RSpec::Matchers.define :respond_with_412 do
436
+ match do |actual|
437
+ actual.response_code == 412
438
+ end
439
+ failure_message do |actual|
440
+ "expected #{actual} to respond with 412 was #{actual.response_code}"
441
+ end
442
+ end
443
+
444
+ RSpec::Matchers.define :respond_with_PRECONDITION_FAILED do
445
+ match do |actual|
446
+ actual.response_code == 412
447
+ end
448
+ failure_message do |actual|
449
+ "expected #{actual} to respond with 412 was #{actual.response_code}"
450
+ end
451
+ end
452
+
453
+ RSpec::Matchers.define :respond_with_precondition_failed do
454
+ match do |actual|
455
+ actual.response_code == 412
456
+ end
457
+ failure_message do |actual|
458
+ "expected #{actual} to respond with 412 was #{actual.response_code}"
459
+ end
460
+ end
461
+
462
+ RSpec::Matchers.define :be_precondition_failed do
463
+ match do |actual|
464
+ actual.response_code == 412
465
+ end
466
+ failure_message do |actual|
467
+ "expected #{actual} to respond with 412 was #{actual.response_code}"
468
+ end
469
+ end
470
+
471
+ RSpec::Matchers.define :respond_with_413 do
472
+ match do |actual|
473
+ actual.response_code == 413
474
+ end
475
+ failure_message do |actual|
476
+ "expected #{actual} to respond with 413 was #{actual.response_code}"
477
+ end
478
+ end
479
+
480
+ RSpec::Matchers.define :respond_with_PAYLOAD_TOO_LARGE do
481
+ match do |actual|
482
+ actual.response_code == 413
483
+ end
484
+ failure_message do |actual|
485
+ "expected #{actual} to respond with 413 was #{actual.response_code}"
486
+ end
487
+ end
488
+
489
+ RSpec::Matchers.define :respond_with_payload_too_large do
490
+ match do |actual|
491
+ actual.response_code == 413
492
+ end
493
+ failure_message do |actual|
494
+ "expected #{actual} to respond with 413 was #{actual.response_code}"
495
+ end
496
+ end
497
+
498
+ RSpec::Matchers.define :be_payload_too_large do
499
+ match do |actual|
500
+ actual.response_code == 413
501
+ end
502
+ failure_message do |actual|
503
+ "expected #{actual} to respond with 413 was #{actual.response_code}"
504
+ end
505
+ end
506
+
507
+ RSpec::Matchers.define :respond_with_414 do
508
+ match do |actual|
509
+ actual.response_code == 414
510
+ end
511
+ failure_message do |actual|
512
+ "expected #{actual} to respond with 414 was #{actual.response_code}"
513
+ end
514
+ end
515
+
516
+ RSpec::Matchers.define :respond_with_REQUEST_URI_TOO_LONG do
517
+ match do |actual|
518
+ actual.response_code == 414
519
+ end
520
+ failure_message do |actual|
521
+ "expected #{actual} to respond with 414 was #{actual.response_code}"
522
+ end
523
+ end
524
+
525
+ RSpec::Matchers.define :respond_with_request_uri_too_long do
526
+ match do |actual|
527
+ actual.response_code == 414
528
+ end
529
+ failure_message do |actual|
530
+ "expected #{actual} to respond with 414 was #{actual.response_code}"
531
+ end
532
+ end
533
+
534
+ RSpec::Matchers.define :be_request_uri_too_long do
535
+ match do |actual|
536
+ actual.response_code == 414
537
+ end
538
+ failure_message do |actual|
539
+ "expected #{actual} to respond with 414 was #{actual.response_code}"
540
+ end
541
+ end
542
+
543
+ RSpec::Matchers.define :respond_with_415 do
544
+ match do |actual|
545
+ actual.response_code == 415
546
+ end
547
+ failure_message do |actual|
548
+ "expected #{actual} to respond with 415 was #{actual.response_code}"
549
+ end
550
+ end
551
+
552
+ RSpec::Matchers.define :respond_with_UNSUPPORTED_MEDIA_TYPE do
553
+ match do |actual|
554
+ actual.response_code == 415
555
+ end
556
+ failure_message do |actual|
557
+ "expected #{actual} to respond with 415 was #{actual.response_code}"
558
+ end
559
+ end
560
+
561
+ RSpec::Matchers.define :respond_with_unsupported_media_type do
562
+ match do |actual|
563
+ actual.response_code == 415
564
+ end
565
+ failure_message do |actual|
566
+ "expected #{actual} to respond with 415 was #{actual.response_code}"
567
+ end
568
+ end
569
+
570
+ RSpec::Matchers.define :be_unsupported_media_type do
571
+ match do |actual|
572
+ actual.response_code == 415
573
+ end
574
+ failure_message do |actual|
575
+ "expected #{actual} to respond with 415 was #{actual.response_code}"
576
+ end
577
+ end
578
+
579
+ RSpec::Matchers.define :respond_with_416 do
580
+ match do |actual|
581
+ actual.response_code == 416
582
+ end
583
+ failure_message do |actual|
584
+ "expected #{actual} to respond with 416 was #{actual.response_code}"
585
+ end
586
+ end
587
+
588
+ RSpec::Matchers.define :respond_with_REQUESTED_RANGE_NOT_SATISFIABLE do
589
+ match do |actual|
590
+ actual.response_code == 416
591
+ end
592
+ failure_message do |actual|
593
+ "expected #{actual} to respond with 416 was #{actual.response_code}"
594
+ end
595
+ end
596
+
597
+ RSpec::Matchers.define :respond_with_requested_range_not_satisfiable do
598
+ match do |actual|
599
+ actual.response_code == 416
600
+ end
601
+ failure_message do |actual|
602
+ "expected #{actual} to respond with 416 was #{actual.response_code}"
603
+ end
604
+ end
605
+
606
+ RSpec::Matchers.define :be_requested_range_not_satisfiable do
607
+ match do |actual|
608
+ actual.response_code == 416
609
+ end
610
+ failure_message do |actual|
611
+ "expected #{actual} to respond with 416 was #{actual.response_code}"
612
+ end
613
+ end
614
+
615
+ RSpec::Matchers.define :respond_with_417 do
616
+ match do |actual|
617
+ actual.response_code == 417
618
+ end
619
+ failure_message do |actual|
620
+ "expected #{actual} to respond with 417 was #{actual.response_code}"
621
+ end
622
+ end
623
+
624
+ RSpec::Matchers.define :respond_with_EXPECTATION_FAILED do
625
+ match do |actual|
626
+ actual.response_code == 417
627
+ end
628
+ failure_message do |actual|
629
+ "expected #{actual} to respond with 417 was #{actual.response_code}"
630
+ end
631
+ end
632
+
633
+ RSpec::Matchers.define :respond_with_expectation_failed do
634
+ match do |actual|
635
+ actual.response_code == 417
636
+ end
637
+ failure_message do |actual|
638
+ "expected #{actual} to respond with 417 was #{actual.response_code}"
639
+ end
640
+ end
641
+
642
+ RSpec::Matchers.define :be_expectation_failed do
643
+ match do |actual|
644
+ actual.response_code == 417
645
+ end
646
+ failure_message do |actual|
647
+ "expected #{actual} to respond with 417 was #{actual.response_code}"
648
+ end
649
+ end
650
+
651
+ RSpec::Matchers.define :respond_with_418 do
652
+ match do |actual|
653
+ actual.response_code == 418
654
+ end
655
+ failure_message do |actual|
656
+ "expected #{actual} to respond with 418 was #{actual.response_code}"
657
+ end
658
+ end
659
+
660
+ RSpec::Matchers.define :respond_with_IM_A_TEAPOT do
661
+ match do |actual|
662
+ actual.response_code == 418
663
+ end
664
+ failure_message do |actual|
665
+ "expected #{actual} to respond with 418 was #{actual.response_code}"
666
+ end
667
+ end
668
+
669
+ RSpec::Matchers.define :respond_with_im_a_teapot do
670
+ match do |actual|
671
+ actual.response_code == 418
672
+ end
673
+ failure_message do |actual|
674
+ "expected #{actual} to respond with 418 was #{actual.response_code}"
675
+ end
676
+ end
677
+
678
+ RSpec::Matchers.define :be_im_a_teapot do
679
+ match do |actual|
680
+ actual.response_code == 418
681
+ end
682
+ failure_message do |actual|
683
+ "expected #{actual} to respond with 418 was #{actual.response_code}"
684
+ end
685
+ end
686
+
687
+ RSpec::Matchers.define :respond_with_421 do
688
+ match do |actual|
689
+ actual.response_code == 421
690
+ end
691
+ failure_message do |actual|
692
+ "expected #{actual} to respond with 421 was #{actual.response_code}"
693
+ end
694
+ end
695
+
696
+ RSpec::Matchers.define :respond_with_MISDIRECTED_REQUEST do
697
+ match do |actual|
698
+ actual.response_code == 421
699
+ end
700
+ failure_message do |actual|
701
+ "expected #{actual} to respond with 421 was #{actual.response_code}"
702
+ end
703
+ end
704
+
705
+ RSpec::Matchers.define :respond_with_misdirected_request do
706
+ match do |actual|
707
+ actual.response_code == 421
708
+ end
709
+ failure_message do |actual|
710
+ "expected #{actual} to respond with 421 was #{actual.response_code}"
711
+ end
712
+ end
713
+
714
+ RSpec::Matchers.define :be_misdirected_request do
715
+ match do |actual|
716
+ actual.response_code == 421
717
+ end
718
+ failure_message do |actual|
719
+ "expected #{actual} to respond with 421 was #{actual.response_code}"
720
+ end
721
+ end
722
+
723
+ RSpec::Matchers.define :respond_with_422 do
724
+ match do |actual|
725
+ actual.response_code == 422
726
+ end
727
+ failure_message do |actual|
728
+ "expected #{actual} to respond with 422 was #{actual.response_code}"
729
+ end
730
+ end
731
+
732
+ RSpec::Matchers.define :respond_with_UNPROCESSABLE_ENTITY do
733
+ match do |actual|
734
+ actual.response_code == 422
735
+ end
736
+ failure_message do |actual|
737
+ "expected #{actual} to respond with 422 was #{actual.response_code}"
738
+ end
739
+ end
740
+
741
+ RSpec::Matchers.define :respond_with_unprocessable_entity do
742
+ match do |actual|
743
+ actual.response_code == 422
744
+ end
745
+ failure_message do |actual|
746
+ "expected #{actual} to respond with 422 was #{actual.response_code}"
747
+ end
748
+ end
749
+
750
+ RSpec::Matchers.define :be_unprocessable_entity do
751
+ match do |actual|
752
+ actual.response_code == 422
753
+ end
754
+ failure_message do |actual|
755
+ "expected #{actual} to respond with 422 was #{actual.response_code}"
756
+ end
757
+ end
758
+
759
+ RSpec::Matchers.define :respond_with_423 do
760
+ match do |actual|
761
+ actual.response_code == 423
762
+ end
763
+ failure_message do |actual|
764
+ "expected #{actual} to respond with 423 was #{actual.response_code}"
765
+ end
766
+ end
767
+
768
+ RSpec::Matchers.define :respond_with_LOCKED do
769
+ match do |actual|
770
+ actual.response_code == 423
771
+ end
772
+ failure_message do |actual|
773
+ "expected #{actual} to respond with 423 was #{actual.response_code}"
774
+ end
775
+ end
776
+
777
+ RSpec::Matchers.define :respond_with_locked do
778
+ match do |actual|
779
+ actual.response_code == 423
780
+ end
781
+ failure_message do |actual|
782
+ "expected #{actual} to respond with 423 was #{actual.response_code}"
783
+ end
784
+ end
785
+
786
+ RSpec::Matchers.define :be_locked do
787
+ match do |actual|
788
+ actual.response_code == 423
789
+ end
790
+ failure_message do |actual|
791
+ "expected #{actual} to respond with 423 was #{actual.response_code}"
792
+ end
793
+ end
794
+
795
+ RSpec::Matchers.define :respond_with_424 do
796
+ match do |actual|
797
+ actual.response_code == 424
798
+ end
799
+ failure_message do |actual|
800
+ "expected #{actual} to respond with 424 was #{actual.response_code}"
801
+ end
802
+ end
803
+
804
+ RSpec::Matchers.define :respond_with_FAILED_DEPENDENCY do
805
+ match do |actual|
806
+ actual.response_code == 424
807
+ end
808
+ failure_message do |actual|
809
+ "expected #{actual} to respond with 424 was #{actual.response_code}"
810
+ end
811
+ end
812
+
813
+ RSpec::Matchers.define :respond_with_failed_dependency do
814
+ match do |actual|
815
+ actual.response_code == 424
816
+ end
817
+ failure_message do |actual|
818
+ "expected #{actual} to respond with 424 was #{actual.response_code}"
819
+ end
820
+ end
821
+
822
+ RSpec::Matchers.define :be_failed_dependency do
823
+ match do |actual|
824
+ actual.response_code == 424
825
+ end
826
+ failure_message do |actual|
827
+ "expected #{actual} to respond with 424 was #{actual.response_code}"
828
+ end
829
+ end
830
+
831
+ RSpec::Matchers.define :respond_with_426 do
832
+ match do |actual|
833
+ actual.response_code == 426
834
+ end
835
+ failure_message do |actual|
836
+ "expected #{actual} to respond with 426 was #{actual.response_code}"
837
+ end
838
+ end
839
+
840
+ RSpec::Matchers.define :respond_with_UPGRADE_REQUIRED do
841
+ match do |actual|
842
+ actual.response_code == 426
843
+ end
844
+ failure_message do |actual|
845
+ "expected #{actual} to respond with 426 was #{actual.response_code}"
846
+ end
847
+ end
848
+
849
+ RSpec::Matchers.define :respond_with_upgrade_required do
850
+ match do |actual|
851
+ actual.response_code == 426
852
+ end
853
+ failure_message do |actual|
854
+ "expected #{actual} to respond with 426 was #{actual.response_code}"
855
+ end
856
+ end
857
+
858
+ RSpec::Matchers.define :be_upgrade_required do
859
+ match do |actual|
860
+ actual.response_code == 426
861
+ end
862
+ failure_message do |actual|
863
+ "expected #{actual} to respond with 426 was #{actual.response_code}"
864
+ end
865
+ end
866
+
867
+ RSpec::Matchers.define :respond_with_428 do
868
+ match do |actual|
869
+ actual.response_code == 428
870
+ end
871
+ failure_message do |actual|
872
+ "expected #{actual} to respond with 428 was #{actual.response_code}"
873
+ end
874
+ end
875
+
876
+ RSpec::Matchers.define :respond_with_PRECONDITION_REQUIRED do
877
+ match do |actual|
878
+ actual.response_code == 428
879
+ end
880
+ failure_message do |actual|
881
+ "expected #{actual} to respond with 428 was #{actual.response_code}"
882
+ end
883
+ end
884
+
885
+ RSpec::Matchers.define :respond_with_precondition_required do
886
+ match do |actual|
887
+ actual.response_code == 428
888
+ end
889
+ failure_message do |actual|
890
+ "expected #{actual} to respond with 428 was #{actual.response_code}"
891
+ end
892
+ end
893
+
894
+ RSpec::Matchers.define :be_precondition_required do
895
+ match do |actual|
896
+ actual.response_code == 428
897
+ end
898
+ failure_message do |actual|
899
+ "expected #{actual} to respond with 428 was #{actual.response_code}"
900
+ end
901
+ end
902
+
903
+ RSpec::Matchers.define :respond_with_429 do
904
+ match do |actual|
905
+ actual.response_code == 429
906
+ end
907
+ failure_message do |actual|
908
+ "expected #{actual} to respond with 429 was #{actual.response_code}"
909
+ end
910
+ end
911
+
912
+ RSpec::Matchers.define :respond_with_TOO_MANY_REQUESTS do
913
+ match do |actual|
914
+ actual.response_code == 429
915
+ end
916
+ failure_message do |actual|
917
+ "expected #{actual} to respond with 429 was #{actual.response_code}"
918
+ end
919
+ end
920
+
921
+ RSpec::Matchers.define :respond_with_too_many_requests do
922
+ match do |actual|
923
+ actual.response_code == 429
924
+ end
925
+ failure_message do |actual|
926
+ "expected #{actual} to respond with 429 was #{actual.response_code}"
927
+ end
928
+ end
929
+
930
+ RSpec::Matchers.define :be_too_many_requests do
931
+ match do |actual|
932
+ actual.response_code == 429
933
+ end
934
+ failure_message do |actual|
935
+ "expected #{actual} to respond with 429 was #{actual.response_code}"
936
+ end
937
+ end
938
+
939
+ RSpec::Matchers.define :respond_with_431 do
940
+ match do |actual|
941
+ actual.response_code == 431
942
+ end
943
+ failure_message do |actual|
944
+ "expected #{actual} to respond with 431 was #{actual.response_code}"
945
+ end
946
+ end
947
+
948
+ RSpec::Matchers.define :respond_with_REQUEST_HEADER_FIELDS_TOO_LARGE do
949
+ match do |actual|
950
+ actual.response_code == 431
951
+ end
952
+ failure_message do |actual|
953
+ "expected #{actual} to respond with 431 was #{actual.response_code}"
954
+ end
955
+ end
956
+
957
+ RSpec::Matchers.define :respond_with_request_header_fields_too_large do
958
+ match do |actual|
959
+ actual.response_code == 431
960
+ end
961
+ failure_message do |actual|
962
+ "expected #{actual} to respond with 431 was #{actual.response_code}"
963
+ end
964
+ end
965
+
966
+ RSpec::Matchers.define :be_request_header_fields_too_large do
967
+ match do |actual|
968
+ actual.response_code == 431
969
+ end
970
+ failure_message do |actual|
971
+ "expected #{actual} to respond with 431 was #{actual.response_code}"
972
+ end
973
+ end
974
+
975
+ RSpec::Matchers.define :respond_with_444 do
976
+ match do |actual|
977
+ actual.response_code == 444
978
+ end
979
+ failure_message do |actual|
980
+ "expected #{actual} to respond with 444 was #{actual.response_code}"
981
+ end
982
+ end
983
+
984
+ RSpec::Matchers.define :respond_with_CONNECTION_CLOSED_WITHOUT_RESPONSE do
985
+ match do |actual|
986
+ actual.response_code == 444
987
+ end
988
+ failure_message do |actual|
989
+ "expected #{actual} to respond with 444 was #{actual.response_code}"
990
+ end
991
+ end
992
+
993
+ RSpec::Matchers.define :respond_with_connection_closed_without_response do
994
+ match do |actual|
995
+ actual.response_code == 444
996
+ end
997
+ failure_message do |actual|
998
+ "expected #{actual} to respond with 444 was #{actual.response_code}"
999
+ end
1000
+ end
1001
+
1002
+ RSpec::Matchers.define :be_connection_closed_without_response do
1003
+ match do |actual|
1004
+ actual.response_code == 444
1005
+ end
1006
+ failure_message do |actual|
1007
+ "expected #{actual} to respond with 444 was #{actual.response_code}"
1008
+ end
1009
+ end
1010
+
1011
+ RSpec::Matchers.define :respond_with_451 do
1012
+ match do |actual|
1013
+ actual.response_code == 451
1014
+ end
1015
+ failure_message do |actual|
1016
+ "expected #{actual} to respond with 451 was #{actual.response_code}"
1017
+ end
1018
+ end
1019
+
1020
+ RSpec::Matchers.define :respond_with_UNAVAILABLE_FOR_LEGAL_REASONS do
1021
+ match do |actual|
1022
+ actual.response_code == 451
1023
+ end
1024
+ failure_message do |actual|
1025
+ "expected #{actual} to respond with 451 was #{actual.response_code}"
1026
+ end
1027
+ end
1028
+
1029
+ RSpec::Matchers.define :respond_with_unavailable_for_legal_reasons do
1030
+ match do |actual|
1031
+ actual.response_code == 451
1032
+ end
1033
+ failure_message do |actual|
1034
+ "expected #{actual} to respond with 451 was #{actual.response_code}"
1035
+ end
1036
+ end
1037
+
1038
+ RSpec::Matchers.define :be_unavailable_for_legal_reasons do
1039
+ match do |actual|
1040
+ actual.response_code == 451
1041
+ end
1042
+ failure_message do |actual|
1043
+ "expected #{actual} to respond with 451 was #{actual.response_code}"
1044
+ end
1045
+ end
1046
+
1047
+ RSpec::Matchers.define :respond_with_499 do
1048
+ match do |actual|
1049
+ actual.response_code == 499
1050
+ end
1051
+ failure_message do |actual|
1052
+ "expected #{actual} to respond with 499 was #{actual.response_code}"
1053
+ end
1054
+ end
1055
+
1056
+ RSpec::Matchers.define :respond_with_CLIENT_CLOSED_REQUEST do
1057
+ match do |actual|
1058
+ actual.response_code == 499
1059
+ end
1060
+ failure_message do |actual|
1061
+ "expected #{actual} to respond with 499 was #{actual.response_code}"
1062
+ end
1063
+ end
1064
+
1065
+ RSpec::Matchers.define :respond_with_client_closed_request do
1066
+ match do |actual|
1067
+ actual.response_code == 499
1068
+ end
1069
+ failure_message do |actual|
1070
+ "expected #{actual} to respond with 499 was #{actual.response_code}"
1071
+ end
1072
+ end
1073
+
1074
+ RSpec::Matchers.define :be_client_closed_request do
1075
+ match do |actual|
1076
+ actual.response_code == 499
1077
+ end
1078
+ failure_message do |actual|
1079
+ "expected #{actual} to respond with 499 was #{actual.response_code}"
1080
+ end
1081
+ end