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

Reorder deprecation_summary to come before dump_summary #1365

Merged
merged 2 commits into from
Mar 4, 2014
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion lib/rspec/core/reporter.rb
Original file line number Diff line number Diff line change
Expand Up @@ -96,8 +96,8 @@ def finish
notify :start_dump, Notifications::NullNotification
notify :dump_pending, Notifications::NullNotification
notify :dump_failures, Notifications::NullNotification
notify :dump_summary, Notifications::SummaryNotification.new(@duration, @example_count, @failure_count, @pending_count)
notify :deprecation_summary, Notifications::NullNotification
notify :dump_summary, Notifications::SummaryNotification.new(@duration, @example_count, @failure_count, @pending_count)
notify :seed, Notifications::SeedNotification.new(@configuration.seed, seed_used?)
ensure
notify :close, Notifications::NullNotification
Expand Down
10 changes: 10 additions & 0 deletions spec/rspec/core/reporter_spec.rb
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,16 @@ module RSpec::Core
expect { reporter.finish }.to_not raise_error
end
end

it "dumps the failure summary after the deprecation summary so failures don't scroll off the screen and get missed" do
formatter = instance_double("RSpec::Core::Formatter::ProgressFormatter")
reporter.register_listener(formatter, :dump_summary, :deprecation_summary)

expect(formatter).to receive(:deprecation_summary).ordered
expect(formatter).to receive(:dump_summary).ordered

reporter.finish
end
end

context "given one formatter" do
Expand Down