Sha256: dae4129652070d6b8ee4f2f35e1006d4f7be6344c6d2966d6fe8105250743372

Contents?: true

Size: 780 Bytes

Versions: 12

Compression:

Stored size: 780 Bytes

Contents

require 'spec_helper'

begin
  require 'active_support/notifications'
rescue LoadError
  nil
end

describe "Net::HTTP Dependency" do
  before do
    Honeybadger::Dependency.reset!
  end

  if defined?(ActiveSupport::Notifications)
    context "when active support notifications are installed" do
      it "installs instrumentation" do
        Honeybadger::Dependency.inject!
        expect(Net::HTTP.instance_method(:request)).to eq Net::HTTP.instance_method(:request_with_honeybadger)
      end
    end
  else
    context "when active support notifications are not installed" do
      it "does not install instrumentation" do
        Honeybadger::Dependency.inject!
        expect(Net::HTTP.instance_methods).not_to include(:request_with_honeybadger)
      end
    end
  end
end

Version data entries

12 entries across 12 versions & 1 rubygems

Version Path
honeybadger-1.16.7 spec/honeybadger/integrations/net_http_spec.rb
honeybadger-1.16.6 spec/honeybadger/integrations/net_http_spec.rb
honeybadger-1.16.5 spec/honeybadger/integrations/net_http_spec.rb
honeybadger-1.16.4 spec/honeybadger/integrations/net_http_spec.rb
honeybadger-1.16.3 spec/honeybadger/integrations/net_http_spec.rb
honeybadger-1.16.2 spec/honeybadger/integrations/net_http_spec.rb
honeybadger-1.16.1 spec/honeybadger/integrations/net_http_spec.rb
honeybadger-1.16.0 spec/honeybadger/integrations/net_http_spec.rb
honeybadger-1.15.3 spec/honeybadger/integrations/net_http_spec.rb
honeybadger-1.15.2 spec/honeybadger/integrations/net_http_spec.rb
honeybadger-1.15.1 spec/honeybadger/integrations/net_http_spec.rb
honeybadger-1.15.0 spec/honeybadger/integrations/net_http_spec.rb