Sha256: 517a97d9fb7861cc7f3d2abbf183a0d34da541970a441ae87929b820723d6592
Contents?: true
Size: 704 Bytes
Versions: 49
Compression:
Stored size: 704 Bytes
Contents
require 'spec_helper' require File.expand_path('lib/appsignal/instrumentations/net_http') describe "Net::HTTP instrumentation" do let(:events) { [] } before do ActiveSupport::Notifications.subscribe(/^[^!]/) do |*args| events << ActiveSupport::Notifications::Event.new(*args) end end it "should instrument request" do stub_request(:any, 'www.google.com') Net::HTTP.get_response(URI.parse('http://www.google.com')) event = events.last event.name.should == 'request.net_http' event.payload[:host].should == 'www.google.com' event.payload[:scheme].should == 'http' event.payload[:path].should == '/' event.payload[:method].should == 'GET' end end
Version data entries
49 entries across 49 versions & 1 rubygems