Sha256: a6c7ff8f54c1654c15982bc4ff7699d3cdc265e8c560888534cc1dcc271d273b
Contents?: true
Size: 1.07 KB
Versions: 13
Compression:
Stored size: 1.07 KB
Contents
if DependencyHelper.resque_present? && DependencyHelper.active_job_present? describe "Resque ActiveJob integration" do let(:file) { File.expand_path('lib/appsignal/integrations/resque_active_job.rb') } context "with Resque and ActiveJob" do before do load file start_agent class TestActiveJob < ActiveJob::Base include Appsignal::Integrations::ResqueActiveJobPlugin def perform(param) end end end describe :around_perform_plugin do before { SecureRandom.stub(:uuid => 123) } let(:job) { TestActiveJob.new('moo') } it "should wrap in a transaction with the correct params" do Appsignal.should_receive(:monitor_single_transaction).with( 'perform_job.resque', :class => 'TestActiveJob', :method => 'perform', :params => ['moo'], :metadata => { :id => 123, :queue => 'default' } ) end after { job.perform_now } end end end end
Version data entries
13 entries across 13 versions & 1 rubygems