@@ -19,7 +19,6 @@ Feature: Aggregating Failures
19
19
end
20
20
"""
21
21
22
- @skip-when-diff-lcs-1.3
23
22
Scenario : Use `aggregate_failures` block form
24
23
Given a file named "spec/use_block_form_spec.rb" with:
25
24
"""ruby
@@ -94,81 +93,6 @@ Feature: Aggregating Failures
94
93
# ./spec/use_block_form_spec.rb:12
95
94
"""
96
95
97
- @skip-when-diff-lcs-1.4
98
- Scenario : Use `aggregate_failures` block form
99
- Given a file named "spec/use_block_form_spec.rb" with:
100
- """ruby
101
- require 'client'
102
-
103
- RSpec.describe Client do
104
- after do
105
- # this should be appended to failure list
106
- expect(false).to be(true), "after hook failure"
107
- end
108
-
109
- around do |ex|
110
- ex.run
111
- # this should also be appended to failure list
112
- expect(false).to be(true), "around hook failure"
113
- end
114
-
115
- it "returns a successful response" do
116
- response = Client.make_request
117
-
118
- aggregate_failures "testing response" do
119
- expect(response.status).to eq(200)
120
- expect(response.headers).to include("Content-Type" => "application/json")
121
- expect(response.body).to eq('{"message":"Success"}')
122
- end
123
- end
124
- end
125
- """
126
- When I run `rspec spec/use_block_form_spec.rb`
127
- Then it should fail and list all the failures:
128
- """
129
- Failures:
130
-
131
- 1) Client returns a successful response
132
- Got 3 failures:
133
-
134
- 1.1) Got 3 failures from failure aggregation block "testing response".
135
- # ./spec/use_block_form_spec.rb:18
136
- # ./spec/use_block_form_spec.rb:10
137
-
138
- 1.1.1) Failure/Error: expect(response.status).to eq(200)
139
-
140
- expected: 200
141
- got: 404
142
-
143
- (compared using ==)
144
- # ./spec/use_block_form_spec.rb:19
145
-
146
- 1.1.2) Failure/Error: expect(response.headers).to include("Content-Type" => "application/json")
147
- expected {"Content-Type" => "text/plain"} to include {"Content-Type" => "application/json"}
148
- Diff:
149
- @@ -1,2 +1,2 @@
150
- -"Content-Type" => "application/json",
151
- +"Content-Type" => "text/plain",
152
- # ./spec/use_block_form_spec.rb:20
153
-
154
- 1.1.3) Failure/Error: expect(response.body).to eq('{"message":"Success"}')
155
-
156
- expected: "{\"message\":\"Success\"}"
157
- got: "Not Found"
158
-
159
- (compared using ==)
160
- # ./spec/use_block_form_spec.rb:21
161
-
162
- 1.2) Failure/Error: expect(false).to be(true), "after hook failure"
163
- after hook failure
164
- # ./spec/use_block_form_spec.rb:6
165
- # ./spec/use_block_form_spec.rb:10
166
-
167
- 1.3) Failure/Error: expect(false).to be(true), "around hook failure"
168
- around hook failure
169
- # ./spec/use_block_form_spec.rb:12
170
- """
171
-
172
96
Scenario : Use `:aggregate_failures` metadata
173
97
Given a file named "spec/use_metadata_spec.rb" with:
174
98
"""ruby
@@ -219,7 +143,6 @@ Feature: Aggregating Failures
219
143
# ./spec/use_metadata_spec.rb:10
220
144
"""
221
145
222
- @skip-when-diff-lcs-1.3
223
146
Scenario : Enable failure aggregation globally using `define_derived_metadata`
224
147
Given a file named "spec/enable_globally_spec.rb" with:
225
148
"""ruby
@@ -274,62 +197,6 @@ Feature: Aggregating Failures
274
197
# ./spec/enable_globally_spec.rb:15
275
198
"""
276
199
277
- @skip-when-diff-lcs-1.4
278
- Scenario : Enable failure aggregation globally using `define_derived_metadata`
279
- Given a file named "spec/enable_globally_spec.rb" with:
280
- """ruby
281
- require 'client'
282
-
283
- RSpec.configure do |c|
284
- c.define_derived_metadata do |meta|
285
- meta[:aggregate_failures] = true
286
- end
287
- end
288
-
289
- RSpec.describe Client do
290
- it "returns a successful response" do
291
- response = Client.make_request
292
-
293
- expect(response.status).to eq(200)
294
- expect(response.headers).to include("Content-Type" => "application/json")
295
- expect(response.body).to eq('{"message":"Success"}')
296
- end
297
- end
298
- """
299
- When I run `rspec spec/enable_globally_spec.rb`
300
- Then it should fail and list all the failures:
301
- """
302
- Failures:
303
-
304
- 1) Client returns a successful response
305
- Got 3 failures:
306
-
307
- 1.1) Failure/Error: expect(response.status).to eq(200)
308
-
309
- expected: 200
310
- got: 404
311
-
312
- (compared using ==)
313
- # ./spec/enable_globally_spec.rb:13
314
-
315
- 1.2) Failure/Error: expect(response.headers).to include("Content-Type" => "application/json")
316
- expected {"Content-Type" => "text/plain"} to include {"Content-Type" => "application/json"}
317
- Diff:
318
- @@ -1,2 +1,2 @@
319
- -"Content-Type" => "application/json",
320
- +"Content-Type" => "text/plain",
321
- # ./spec/enable_globally_spec.rb:14
322
-
323
- 1.3) Failure/Error: expect(response.body).to eq('{"message":"Success"}')
324
-
325
- expected: "{\"message\":\"Success\"}"
326
- got: "Not Found"
327
-
328
- (compared using ==)
329
- # ./spec/enable_globally_spec.rb:15
330
- """
331
-
332
- @skip-when-diff-lcs-1.3
333
200
Scenario : Nested failure aggregation works
334
201
Given a file named "spec/nested_failure_aggregation_spec.rb" with:
335
202
"""ruby
@@ -394,71 +261,6 @@ Feature: Aggregating Failures
394
261
# ./spec/nested_failure_aggregation_spec.rb:14
395
262
"""
396
263
397
- @skip-when-diff-lcs-1.4
398
- Scenario : Nested failure aggregation works
399
- Given a file named "spec/nested_failure_aggregation_spec.rb" with:
400
- """ruby
401
- require 'client'
402
-
403
- RSpec.describe Client do
404
- it "returns a successful response", :aggregate_failures do
405
- response = Client.make_request
406
-
407
- expect(response.status).to eq(200)
408
-
409
- aggregate_failures "testing headers" do
410
- expect(response.headers).to include("Content-Type" => "application/json")
411
- expect(response.headers).to include("Content-Length" => "21")
412
- end
413
-
414
- expect(response.body).to eq('{"message":"Success"}')
415
- end
416
- end
417
- """
418
- When I run `rspec spec/nested_failure_aggregation_spec.rb`
419
- Then it should fail and list all the failures:
420
- """
421
- Failures:
422
-
423
- 1) Client returns a successful response
424
- Got 3 failures:
425
-
426
- 1.1) Failure/Error: expect(response.status).to eq(200)
427
-
428
- expected: 200
429
- got: 404
430
-
431
- (compared using ==)
432
- # ./spec/nested_failure_aggregation_spec.rb:7
433
-
434
- 1.2) Got 2 failures from failure aggregation block "testing headers".
435
- # ./spec/nested_failure_aggregation_spec.rb:9
436
-
437
- 1.2.1) Failure/Error: expect(response.headers).to include("Content-Type" => "application/json")
438
- expected {"Content-Type" => "text/plain"} to include {"Content-Type" => "application/json"}
439
- Diff:
440
- @@ -1,2 +1,2 @@
441
- -"Content-Type" => "application/json",
442
- +"Content-Type" => "text/plain",
443
- # ./spec/nested_failure_aggregation_spec.rb:10
444
-
445
- 1.2.2) Failure/Error: expect(response.headers).to include("Content-Length" => "21")
446
- expected {"Content-Type" => "text/plain"} to include {"Content-Length" => "21"}
447
- Diff:
448
- @@ -1,2 +1,2 @@
449
- -"Content-Length" => "21",
450
- +"Content-Type" => "text/plain",
451
- # ./spec/nested_failure_aggregation_spec.rb:11
452
-
453
- 1.3) Failure/Error: expect(response.body).to eq('{"message":"Success"}')
454
-
455
- expected: "{\"message\":\"Success\"}"
456
- got: "Not Found"
457
-
458
- (compared using ==)
459
- # ./spec/nested_failure_aggregation_spec.rb:14
460
- """
461
-
462
264
Scenario : Mock expectation failures are aggregated as well
463
265
Given a file named "spec/mock_expectation_failure_spec.rb" with:
464
266
"""ruby
@@ -499,7 +301,6 @@ Feature: Aggregating Failures
499
301
500
302
"""
501
303
502
- @skip-when-diff-lcs-1.3
503
304
Scenario : Pending integrates properly with aggregated failures
504
305
Given a file named "spec/pending_spec.rb" with:
505
306
"""ruby
@@ -549,54 +350,3 @@ Feature: Aggregating Failures
549
350
(compared using ==)
550
351
# ./spec/pending_spec.rb:10
551
352
"""
552
-
553
- @skip-when-diff-lcs-1.4
554
- Scenario : Pending integrates properly with aggregated failures
555
- Given a file named "spec/pending_spec.rb" with:
556
- """ruby
557
- require 'client'
558
-
559
- RSpec.describe Client do
560
- it "returns a successful response", :aggregate_failures do
561
- pending "Not yet ready"
562
- response = Client.make_request
563
-
564
- expect(response.status).to eq(200)
565
- expect(response.headers).to include("Content-Type" => "application/json")
566
- expect(response.body).to eq('{"message":"Success"}')
567
- end
568
- end
569
- """
570
- When I run `rspec spec/pending_spec.rb`
571
- Then it should pass and list all the pending examples:
572
- """
573
- Pending: (Failures listed here are expected and do not affect your suite's status)
574
-
575
- 1) Client returns a successful response
576
- # Not yet ready
577
- Got 3 failures:
578
-
579
- 1.1) Failure/Error: expect(response.status).to eq(200)
580
-
581
- expected: 200
582
- got: 404
583
-
584
- (compared using ==)
585
- # ./spec/pending_spec.rb:8
586
-
587
- 1.2) Failure/Error: expect(response.headers).to include("Content-Type" => "application/json")
588
- expected {"Content-Type" => "text/plain"} to include {"Content-Type" => "application/json"}
589
- Diff:
590
- @@ -1,2 +1,2 @@
591
- -"Content-Type" => "application/json",
592
- +"Content-Type" => "text/plain",
593
- # ./spec/pending_spec.rb:9
594
-
595
- 1.3) Failure/Error: expect(response.body).to eq('{"message":"Success"}')
596
-
597
- expected: "{\"message\":\"Success\"}"
598
- got: "Not Found"
599
-
600
- (compared using ==)
601
- # ./spec/pending_spec.rb:10
602
- """
0 commit comments