spec/betterlog/log_spec.rb in betterlog-0.9.0 vs spec/betterlog/log_spec.rb in betterlog-0.10.0
- old
+ new
@@ -56,11 +56,11 @@
end
end
describe '#info with internal logging error' do
it 'should not crash ever, just log the problem to Rails.logger' do
- expect_any_instance_of(instance.logger.class).to receive(:fatal).and_call_original
+ expect_any_instance_of(instance.logger.class).to receive(:fatal)
expect(Log.info(BasicObject.new)).to eq Log.instance
end
end
describe '#notify?' do
@@ -73,9 +73,13 @@
around do |example|
Betterlog::Notifiers.register(notifier)
example.run
ensure
Betterlog::Notifiers.notifiers.clear
+ end
+
+ before do
+ expect_any_instance_of(::Logger).to receive(:send).with(:info, any_args)
end
it 'can send explicit notifications' do
expect(notifier).to receive(:notify).with(
'test',