Sha256: 9af555b489481b665c2d62bc71d3151327debf8b509f80f1872cd83be82c3b30

Contents?: true

Size: 671 Bytes

Versions: 62

Compression:

Stored size: 671 Bytes

Contents

require 'test_helper'

begin
  require 'airbrake'
rescue LoadError
  warn "Install airbrake gem to run Airbrake tests."
end

if defined? Airbrake
  require 'resque/failure/airbrake'
  context "Airbrake" 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}

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

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

Version data entries

62 entries across 62 versions & 5 rubygems

Version Path
classiccms-0.7.5 vendor/bundle/gems/resque-1.20.0/test/airbrake_test.rb
classiccms-0.7.4 vendor/bundle/gems/resque-1.20.0/test/airbrake_test.rb
classiccms-0.7.3 vendor/bundle/gems/resque-1.20.0/test/airbrake_test.rb
resque-1.25.2 test/airbrake_test.rb
resque-1.26.pre.0 test/airbrake_test.rb
resque_signal_from_child-1.25.1 test/airbrake_test.rb
resque-1.25.1 test/airbrake_test.rb
resque-1.25.0 test/airbrake_test.rb
resque-1.25.0.pre test/airbrake_test.rb
classiccms-0.7.2 vendor/bundle/gems/resque-1.20.0/test/airbrake_test.rb
classiccms-0.7.1 vendor/bundle/gems/resque-1.20.0/test/airbrake_test.rb
classiccms-0.7.0 vendor/bundle/gems/resque-1.20.0/test/airbrake_test.rb
resque-1.24.1 test/airbrake_test.rb
resque-1.24.0 test/airbrake_test.rb
resque-1.23.1 test/airbrake_test.rb
classiccms-0.6.9 vendor/bundle/gems/resque-1.20.0/test/airbrake_test.rb
classiccms-0.6.8 vendor/bundle/gems/resque-1.20.0/test/airbrake_test.rb
classiccms-0.6.7 vendor/bundle/gems/resque-1.20.0/test/airbrake_test.rb
classiccms-0.6.6 vendor/bundle/gems/resque-1.20.0/test/airbrake_test.rb
classiccms-0.6.5 vendor/bundle/gems/resque-1.20.0/test/airbrake_test.rb