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

Commit ff752da

Browse files
committed
refactor ProfileFormatter specs in formatter loader
1 parent 64658a3 commit ff752da

File tree

1 file changed

+5
-2
lines changed

1 file changed

+5
-2
lines changed

spec/rspec/core/formatters_spec.rb

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -163,8 +163,11 @@ module RSpec::Core::Formatters
163163
context "without an existing profile formatter" do
164164
it "will add the profile formatter" do
165165
allow(reporter).to receive(:registered_listeners).with(:dump_profile) { [] }
166-
setup_default
167-
expect(loader.formatters.last).to be_a ::RSpec::Core::Formatters::ProfileFormatter
166+
expect {
167+
setup_default
168+
}.to change { loader.formatters }.
169+
from( excluding an_instance_of ::RSpec::Core::Formatters::ProfileFormatter ).
170+
to( including an_instance_of ::RSpec::Core::Formatters::ProfileFormatter )
168171
end
169172
end
170173

0 commit comments

Comments
 (0)