Skip to content

Instantly share code, notes, and snippets.

@danielvlopes
Created April 13, 2010 04:25
Show Gist options
  • Save danielvlopes/364314 to your computer and use it in GitHub Desktop.
Save danielvlopes/364314 to your computer and use it in GitHub Desktop.
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