test/test_exception_handler.rb in sidekiq-2.1.1 vs test/test_exception_handler.rb in sidekiq-2.2.0

- old
+ new

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