Sha256: 3a3663ed20f340ac46acc01cdb06dd840461dab98d6f5805ade4978309aab7e4

Contents?: true

Size: 1.02 KB

Versions: 20

Compression:

Stored size: 1.02 KB

Contents

# frozen_string_literal: true

describe Appsignal::Hooks::HttpHook do
  before { start_agent }

  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

20 entries across 20 versions & 1 rubygems

Version Path
appsignal-3.13.1-java spec/lib/appsignal/hooks/http_spec.rb
appsignal-3.13.1 spec/lib/appsignal/hooks/http_spec.rb
appsignal-3.13.1.alpha.1-java spec/lib/appsignal/hooks/http_spec.rb
appsignal-3.13.1.alpha.1 spec/lib/appsignal/hooks/http_spec.rb
appsignal-3.13.0-java spec/lib/appsignal/hooks/http_spec.rb
appsignal-3.13.0 spec/lib/appsignal/hooks/http_spec.rb
appsignal-3.12.6-java spec/lib/appsignal/hooks/http_spec.rb
appsignal-3.12.6 spec/lib/appsignal/hooks/http_spec.rb
appsignal-3.12.5-java spec/lib/appsignal/hooks/http_spec.rb
appsignal-3.12.5 spec/lib/appsignal/hooks/http_spec.rb
appsignal-3.12.4-java spec/lib/appsignal/hooks/http_spec.rb
appsignal-3.12.4 spec/lib/appsignal/hooks/http_spec.rb
appsignal-3.12.3-java spec/lib/appsignal/hooks/http_spec.rb
appsignal-3.12.3 spec/lib/appsignal/hooks/http_spec.rb
appsignal-3.12.2-java spec/lib/appsignal/hooks/http_spec.rb
appsignal-3.12.2 spec/lib/appsignal/hooks/http_spec.rb
appsignal-3.12.1-java spec/lib/appsignal/hooks/http_spec.rb
appsignal-3.12.1 spec/lib/appsignal/hooks/http_spec.rb
appsignal-3.12.0-java spec/lib/appsignal/hooks/http_spec.rb
appsignal-3.12.0 spec/lib/appsignal/hooks/http_spec.rb