Sha256: 0a20ab39f203ef37645305c92c4d0008e487b9d31100d1a8f48c53d5678934f8

Contents?: true

Size: 1.03 KB

Versions: 114

Compression:

Stored size: 1.03 KB

Contents

# frozen_string_literal: true

describe Appsignal::Hooks::HttpHook do
  before :context do
    start_agent
  end

  if DependencyHelper.http_present?
    context "with instrument_http_rb set to true" do
      describe "#dependencies_present?" do
        subject { described_class.new.dependencies_present? }

        it { is_expected.to be_truthy }
      end

      it "installs the HTTP plugin" do
        expect(HTTP::Client.included_modules)
          .to include(Appsignal::Integrations::HttpIntegration)
      end
    end

    context "with instrument_http_rb set to false" do
      before { Appsignal.config.config_hash[:instrument_http_rb] = false }
      after { Appsignal.config.config_hash[:instrument_http_rb] = true }

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

        it { is_expected.to be_falsy }
      end
    end
  else
    describe "#dependencies_present?" do
      subject { described_class.new.dependencies_present? }

      it { is_expected.to be_falsy }
    end
  end
end

Version data entries

114 entries across 114 versions & 1 rubygems

Version Path
appsignal-3.4.2-java spec/lib/appsignal/hooks/http_spec.rb
appsignal-3.4.2 spec/lib/appsignal/hooks/http_spec.rb
appsignal-3.4.1-java spec/lib/appsignal/hooks/http_spec.rb
appsignal-3.4.1 spec/lib/appsignal/hooks/http_spec.rb
appsignal-3.4.0-java spec/lib/appsignal/hooks/http_spec.rb
appsignal-3.4.0 spec/lib/appsignal/hooks/http_spec.rb
appsignal-3.3.10-java spec/lib/appsignal/hooks/http_spec.rb
appsignal-3.3.10 spec/lib/appsignal/hooks/http_spec.rb
appsignal-3.3.9-java spec/lib/appsignal/hooks/http_spec.rb
appsignal-3.3.9 spec/lib/appsignal/hooks/http_spec.rb
appsignal-3.3.8-java spec/lib/appsignal/hooks/http_spec.rb
appsignal-3.3.8 spec/lib/appsignal/hooks/http_spec.rb
appsignal-3.3.7-java spec/lib/appsignal/hooks/http_spec.rb
appsignal-3.3.7 spec/lib/appsignal/hooks/http_spec.rb
appsignal-3.3.6-java spec/lib/appsignal/hooks/http_spec.rb
appsignal-3.3.6 spec/lib/appsignal/hooks/http_spec.rb
appsignal-3.3.5-java spec/lib/appsignal/hooks/http_spec.rb
appsignal-3.3.5 spec/lib/appsignal/hooks/http_spec.rb
appsignal-3.3.4-java spec/lib/appsignal/hooks/http_spec.rb
appsignal-3.3.4 spec/lib/appsignal/hooks/http_spec.rb