Sha256: 0ed4ead7f1630fc555a983807df7b362e9488f9ea6bc6fe4cd2a25c36b0a85ca

Contents?: true

Size: 886 Bytes

Versions: 40

Compression:

Stored size: 886 Bytes

Contents

describe Appsignal::Hooks::DelayedJobHook do
  context "with delayed job" do
    before(:context) do
      module Delayed
        class Plugin
          def self.callbacks
          end
        end

        class Worker
          def self.plugins
            @plugins ||= []
          end
        end
      end
    end
    after(:context) { Object.send(:remove_const, :Delayed) }
    before { start_agent }

    describe "#dependencies_present?" do
      subject { described_class.new.dependencies_present? }

      it { is_expected.to be_truthy }
    end

    it "adds the plugin" do
      expect(::Delayed::Worker.plugins).to include(Appsignal::Integrations::DelayedJobPlugin)
    end
  end

  context "without delayed job" do
    describe "#dependencies_present?" do
      subject { described_class.new.dependencies_present? }

      it { is_expected.to be_falsy }
    end
  end
end

Version data entries

40 entries across 40 versions & 1 rubygems

Version Path
appsignal-4.0.0.beta.1-java spec/lib/appsignal/hooks/delayed_job_spec.rb
appsignal-4.0.0.beta.1 spec/lib/appsignal/hooks/delayed_job_spec.rb
appsignal-3.13.0-java spec/lib/appsignal/hooks/delayed_job_spec.rb
appsignal-3.13.0 spec/lib/appsignal/hooks/delayed_job_spec.rb
appsignal-3.12.6-java spec/lib/appsignal/hooks/delayed_job_spec.rb
appsignal-3.12.6 spec/lib/appsignal/hooks/delayed_job_spec.rb
appsignal-3.12.5-java spec/lib/appsignal/hooks/delayed_job_spec.rb
appsignal-3.12.5 spec/lib/appsignal/hooks/delayed_job_spec.rb
appsignal-3.12.4-java spec/lib/appsignal/hooks/delayed_job_spec.rb
appsignal-3.12.4 spec/lib/appsignal/hooks/delayed_job_spec.rb
appsignal-3.12.3-java spec/lib/appsignal/hooks/delayed_job_spec.rb
appsignal-3.12.3 spec/lib/appsignal/hooks/delayed_job_spec.rb
appsignal-3.12.2-java spec/lib/appsignal/hooks/delayed_job_spec.rb
appsignal-3.12.2 spec/lib/appsignal/hooks/delayed_job_spec.rb
appsignal-3.12.1-java spec/lib/appsignal/hooks/delayed_job_spec.rb
appsignal-3.12.1 spec/lib/appsignal/hooks/delayed_job_spec.rb
appsignal-3.12.0-java spec/lib/appsignal/hooks/delayed_job_spec.rb
appsignal-3.12.0 spec/lib/appsignal/hooks/delayed_job_spec.rb
appsignal-3.11.0-java spec/lib/appsignal/hooks/delayed_job_spec.rb
appsignal-3.11.0 spec/lib/appsignal/hooks/delayed_job_spec.rb