Skip to content
This repository was archived by the owner on Nov 30, 2024. It is now read-only.

Commit 7080ec5

Browse files
authored
Merge pull request #2833 from rspec/remove-diff-helpers
Bump diff-lcs to 1.4.4+
2 parents 0c3a9d8 + abe2263 commit 7080ec5

File tree

4 files changed

+1
-274
lines changed

4 files changed

+1
-274
lines changed

.github/workflows/ci.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -30,7 +30,7 @@ jobs:
3030
- 2.3
3131
env:
3232
-
33-
DIFF_LCS_VERSION: "> 1.4.3"
33+
BOGUS: ""
3434
include:
3535
- ruby: ruby-head
3636
env:

Gemfile

Lines changed: 0 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -12,12 +12,6 @@ branch = File.read(File.expand_path("../maintenance-branch", __FILE__)).chomp
1212
end
1313
end
1414

15-
if ENV['DIFF_LCS_VERSION']
16-
gem 'diff-lcs', ENV['DIFF_LCS_VERSION']
17-
else
18-
gem 'diff-lcs', '~> 1.4', '>= 1.4.3'
19-
end
20-
2115
gem 'yard', '~> 0.9.24', :require => false
2216

2317
### deps for rdoc.info

features/expectation_framework_integration/aggregating_failures.feature

Lines changed: 0 additions & 250 deletions
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,6 @@ Feature: Aggregating Failures
1919
end
2020
"""
2121

22-
@skip-when-diff-lcs-1.3
2322
Scenario: Use `aggregate_failures` block form
2423
Given a file named "spec/use_block_form_spec.rb" with:
2524
"""ruby
@@ -94,81 +93,6 @@ Feature: Aggregating Failures
9493
# ./spec/use_block_form_spec.rb:12
9594
"""
9695

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-
17296
Scenario: Use `:aggregate_failures` metadata
17397
Given a file named "spec/use_metadata_spec.rb" with:
17498
"""ruby
@@ -219,7 +143,6 @@ Feature: Aggregating Failures
219143
# ./spec/use_metadata_spec.rb:10
220144
"""
221145

222-
@skip-when-diff-lcs-1.3
223146
Scenario: Enable failure aggregation globally using `define_derived_metadata`
224147
Given a file named "spec/enable_globally_spec.rb" with:
225148
"""ruby
@@ -274,62 +197,6 @@ Feature: Aggregating Failures
274197
# ./spec/enable_globally_spec.rb:15
275198
"""
276199

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
333200
Scenario: Nested failure aggregation works
334201
Given a file named "spec/nested_failure_aggregation_spec.rb" with:
335202
"""ruby
@@ -394,71 +261,6 @@ Feature: Aggregating Failures
394261
# ./spec/nested_failure_aggregation_spec.rb:14
395262
"""
396263

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-
462264
Scenario: Mock expectation failures are aggregated as well
463265
Given a file named "spec/mock_expectation_failure_spec.rb" with:
464266
"""ruby
@@ -499,7 +301,6 @@ Feature: Aggregating Failures
499301
500302
"""
501303

502-
@skip-when-diff-lcs-1.3
503304
Scenario: Pending integrates properly with aggregated failures
504305
Given a file named "spec/pending_spec.rb" with:
505306
"""ruby
@@ -549,54 +350,3 @@ Feature: Aggregating Failures
549350
(compared using ==)
550351
# ./spec/pending_spec.rb:10
551352
"""
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-
"""

features/support/diff_lcs_versions.rb

Lines changed: 0 additions & 17 deletions
This file was deleted.

0 commit comments

Comments
 (0)