Sha256: 599fd01f87b2e7a5e35ebda404b8afa567c70e51aa2d06403746166366c628e5

Contents?: true

Size: 661 Bytes

Versions: 18

Compression:

Stored size: 661 Bytes

Contents

require 'test_helper'

begin
  require 'hoptoad_notifier'
rescue LoadError
  warn "Install hoptoad_notifier gem to run Hoptoad tests."
end

if defined? HoptoadNotifier
  context "Hoptoad" do
    test "should be notified of an error" do
      exception = StandardError.new("BOOM")
      worker = Resque::Worker.new(:test)
      queue = "test"
      payload = {'class' => Object, 'args' => 66}

      HoptoadNotifier.expects(:notify_or_ignore).with(
        exception,
        :parameters => {:payload_class => 'Object', :payload_args => '66'})

      backend = Resque::Failure::Hoptoad.new(exception, worker, queue, payload)
      backend.save
    end
  end
end

Version data entries

18 entries across 18 versions & 6 rubygems

Version Path
nogara-resque-loner-1.2.1 test/hoptoad_test.rb
resque-loner-1.2.1 test/hoptoad_test.rb
resque-loner-1.2.0 test/hoptoad_test.rb
ryansch-resque-loner-1.0.1.2 test/hoptoad_test.rb
nfo-resque-mongo-1.17.2 test/hoptoad_test.rb
resque-1.18.6 test/hoptoad_test.rb
steini-resque-1.18.5 test/hoptoad_test.rb
resque-1.18.5 test/hoptoad_test.rb
resque-1.18.4 test/hoptoad_test.rb
resque-1.18.3 test/hoptoad_test.rb
resque-1.18.2 test/hoptoad_test.rb
resque-1.18.1 test/hoptoad_test.rb
resque-1.18.0 test/hoptoad_test.rb
nfo-resque-mongo-1.17.1 test/hoptoad_test.rb
resque-1.17.1 test/hoptoad_test.rb
resque-1.17.0 test/hoptoad_test.rb
resque-1.16.1 test/hoptoad_test.rb
resque-1.16.0 test/hoptoad_test.rb