mirror of
https://github.com/mperham/sidekiq.git
synced 2022-11-09 13:52:34 -05:00
Fixed ExceptionNotifier test
This commit is contained in:
parent
d2af4ef525
commit
7bd41fd7ef
1 changed files with 3 additions and 7 deletions
|
@ -73,8 +73,7 @@ class TestExceptionHandler < MiniTest::Unit::TestCase
|
|||
|
||||
describe "with fake ExceptionNotifier" do
|
||||
before do
|
||||
::ExceptionNotifier = Module.new
|
||||
::ExceptionNotifier::Notifier = MiniTest::Mock.new
|
||||
::ExceptionNotifier = MiniTest::Mock.new
|
||||
end
|
||||
|
||||
after do
|
||||
|
@ -82,12 +81,9 @@ class TestExceptionHandler < MiniTest::Unit::TestCase
|
|||
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,nil,[TEST_EXCEPTION, :data => { :message => { :b => 2 } }])
|
||||
Component.new.invoke_exception(:b => 2)
|
||||
::ExceptionNotifier::Notifier.verify
|
||||
mail.verify
|
||||
::ExceptionNotifier.verify
|
||||
end
|
||||
end
|
||||
|
||||
|
|
Loading…
Reference in a new issue