Sha256: fcce9fefec3cd28828e4f33f9accc394580363087206fb42b6a946f25898232d
Contents?: true
Size: 857 Bytes
Versions: 44
Compression:
Stored size: 857 Bytes
Contents
shared_examples "activesupport finish_with_state override" do let(:instrumenter) { as.instrumenter } it "instruments an ActiveSupport::Notifications.start/finish event with payload on finish" do listeners_state = instrumenter.start("sql.active_record", {}) instrumenter.finish_with_state(listeners_state, "sql.active_record", :sql => "SQL") expect(transaction).to include_event( "body" => "SQL", "body_format" => Appsignal::EventFormatter::SQL_BODY_FORMAT, "count" => 1, "name" => "sql.active_record", "title" => "" ) end it "does not instrument events whose name starts with a bang" do listeners_state = instrumenter.start("!sql.active_record", {}) instrumenter.finish_with_state(listeners_state, "!sql.active_record", :sql => "SQL") expect(transaction).to_not include_events end end
Version data entries
44 entries across 44 versions & 1 rubygems