1
0
Fork 0
mirror of https://github.com/mperham/sidekiq.git synced 2022-11-09 13:52:34 -05:00

Revert test change

This commit is contained in:
Mike Perham 2013-05-24 11:13:42 -07:00
parent 965f8b28ec
commit dcf68b9624

View file

@ -73,7 +73,8 @@ class TestExceptionHandler < Minitest::Test
describe "with fake ExceptionNotifier" do
before do
::ExceptionNotifier = Minitest::Mock.new
::ExceptionNotifier = Module.new
::ExceptionNotifier::Notifier = MiniTest::Mock.new
end
after do
@ -81,9 +82,12 @@ class TestExceptionHandler < Minitest::Test
end
it "notifies ExceptionNotifier" do
::ExceptionNotifier.expect(:notify_exception,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.verify
::ExceptionNotifier::Notifier.verify
mail.verify
end
end