Created
April 13, 2010 04:25
-
-
Save danielvlopes/364314 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
require "spec/spec_helper" | |
class WrongUser | |
def deliver_message | |
raise | |
end | |
end | |
class WrongNotifierJob | |
def perform | |
WrongUser.deliver_message | |
end | |
end | |
describe Delayed do | |
it "should call HoptoadNotifier" do | |
HoptoadNotifier.expects(:notify) | |
@worker = Delayed::Worker.new(:max_priority => nil, :min_priority => nil, :quiet => true) | |
Delayed::Job.create(:payload_object => WrongNotifierJob.new) | |
@worker.work_off | |
end | |
end |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment