Skip to content

Commit 048ca59

Browse files
committed
Add comments explaining number of formatters
[skip ci]
1 parent c4ce48c commit 048ca59

File tree

1 file changed

+5
-0
lines changed

1 file changed

+5
-0
lines changed

spec/rspec/core/configuration_spec.rb

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1488,13 +1488,18 @@ def metadata_hash(*args)
14881488
config.formatter = :documentation
14891489
}.to change { config.formatters.size }.from(0).to(1)
14901490

1491+
# notify triggers the formatter setup, there are two due to the already configured
1492+
# documentation formatter and deprecation formatter
14911493
expect {
14921494
config.reporter.notify :message, double(:message => 'Triggers formatter setup')
14931495
}.to change { config.formatters.size }.from(1).to(2)
14941496
end
14951497

14961498
it 'still configures a default formatter when none specified' do
14971499
config.reporter.register_listener double(:message => nil), :message
1500+
1501+
# notify triggers the formatter setup, there are two due to the default
1502+
# (progress) and deprecation formatter
14981503
expect {
14991504
config.reporter.notify :message, double(:message => 'Triggers formatter setup')
15001505
}.to change { config.formatters.size }.from(0).to(2)

0 commit comments

Comments
 (0)