Sha256: 7a67c1f145a8afb27a16b80081b6a886fcc17d80f4ef610cb4ad41af7b5f17f5

Contents?: true

Size: 683 Bytes

Versions: 10

Compression:

Stored size: 683 Bytes

Contents

describe Appsignal::Hooks::ResqueHook do
  describe "#dependency_present?" do
    subject { described_class.new.dependencies_present? }

    context "when Resque is loaded" do
      before { stub_const "Resque", 1 }

      it { is_expected.to be_truthy }
    end

    context "when Resque is not loaded" do
      before { hide_const "Resque" }

      it { is_expected.to be_falsy }
    end
  end

  if DependencyHelper.resque_present?
    describe "#install" do
      before { start_agent }

      it "adds the ResqueIntegration module to Resque::Job" do
        expect(Resque::Job.included_modules).to include(Appsignal::Integrations::ResqueIntegration)
      end
    end
  end
end

Version data entries

10 entries across 10 versions & 1 rubygems

Version Path
appsignal-4.0.6-java spec/lib/appsignal/hooks/resque_spec.rb
appsignal-4.0.6 spec/lib/appsignal/hooks/resque_spec.rb
appsignal-4.0.5-java spec/lib/appsignal/hooks/resque_spec.rb
appsignal-4.0.5 spec/lib/appsignal/hooks/resque_spec.rb
appsignal-4.0.4-java spec/lib/appsignal/hooks/resque_spec.rb
appsignal-4.0.4 spec/lib/appsignal/hooks/resque_spec.rb
appsignal-4.0.3-java spec/lib/appsignal/hooks/resque_spec.rb
appsignal-4.0.3 spec/lib/appsignal/hooks/resque_spec.rb
appsignal-4.0.2-java spec/lib/appsignal/hooks/resque_spec.rb
appsignal-4.0.2 spec/lib/appsignal/hooks/resque_spec.rb