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

Commit 8fb63bb

Browse files
committed
Add spec for deprecation summary ordering
1 parent f5c01b1 commit 8fb63bb

File tree

1 file changed

+10
-0
lines changed

1 file changed

+10
-0
lines changed

spec/rspec/core/reporter_spec.rb

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -20,6 +20,16 @@ module RSpec::Core
2020
expect { reporter.finish }.to_not raise_error
2121
end
2222
end
23+
24+
it "dumps the failure summary after the deprecation summary so failures don't scroll off the screen and get missed" do
25+
formatter = instance_double("RSpec::Core::Formatter::ProgressFormatter")
26+
reporter.register_listener(formatter, :dump_summary, :deprecation_summary)
27+
28+
expect(formatter).to receive(:deprecation_summary).ordered
29+
expect(formatter).to receive(:dump_summary).ordered
30+
31+
reporter.finish
32+
end
2333
end
2434

2535
context "given one formatter" do

0 commit comments

Comments
 (0)