test/test_exception_handler.rb in sidekiq-2.13.0 vs test/test_exception_handler.rb in sidekiq-2.13.1

- old
+ new

@@ -71,24 +71,20 @@ end end describe "with fake ExceptionNotifier" do before do - ::ExceptionNotifier = Module.new - ::ExceptionNotifier::Notifier = MiniTest::Mock.new + ::ExceptionNotifier = MiniTest::Mock.new end after do Object.send(:remove_const, "ExceptionNotifier") end it "notifies ExceptionNotifier" do - mail = MiniTest::Mock.new - mail.expect(:deliver,nil) - ::ExceptionNotifier::Notifier.expect(:background_exception_notification,mail,[TEST_EXCEPTION, :data => { :message => { :b => 2 } }]) + ::ExceptionNotifier.expect(:notify_exception,true,[TEST_EXCEPTION, :data => { :message => { :b => 2 } }]) Component.new.invoke_exception(:b => 2) - ::ExceptionNotifier::Notifier.verify - mail.verify + ::ExceptionNotifier.verify end end describe "with fake Exceptional" do before do