spec/knapsack/adapters/minitest_adapter_spec.rb in knapsack-1.9.0 vs spec/knapsack/adapters/minitest_adapter_spec.rb in knapsack-1.10.0
- old
+ new
@@ -72,15 +72,17 @@
end
end
describe '#bind_time_offset_warning' do
let(:time_offset_warning) { 'Time offset warning' }
+ let(:log_level) { :info }
- it do
+ it 'creates a post-run callback to log the time offset message at the specified log level' do
expect(::Minitest).to receive(:after_run).and_yield
expect(Knapsack::Presenter).to receive(:time_offset_warning).and_return(time_offset_warning)
- expect(logger).to receive(:warn).with(time_offset_warning)
+ expect(Knapsack::Presenter).to receive(:time_offset_log_level).and_return(log_level)
+ expect(logger).to receive(:log).with(log_level, time_offset_warning)
subject.bind_time_offset_warning
end
end
end