File tree Expand file tree Collapse file tree 1 file changed +10
-0
lines changed Expand file tree Collapse file tree 1 file changed +10
-0
lines changed Original file line number Diff line number Diff line change @@ -1471,6 +1471,16 @@ def metadata_hash(*args)
1471
1471
expect ( config . formatters ) . to be_empty
1472
1472
end
1473
1473
1474
+ it 'buffers deprecations until the reporter is ready' do
1475
+ allow ( config . formatter_loader ) . to receive ( :prepare_default ) . and_wrap_original do |original , *args |
1476
+ config . reporter . deprecation :message => 'Test deprecation'
1477
+ original . call ( *args )
1478
+ end
1479
+ expect {
1480
+ config . reporter . notify :deprecation_summary , Notifications ::NullNotification
1481
+ } . to change { config . deprecation_stream . string } . to include 'Test deprecation'
1482
+ end
1483
+
1474
1484
it 'allows registering listeners without doubling up formatters' do
1475
1485
config . reporter . register_listener double ( :message => nil ) , :message
1476
1486
You can’t perform that action at this time.
0 commit comments