Sha256: 6de13bf717280c037a8341f6761c1b756021c047dbd5ba5c39017e0248d84186

Contents?: true

Size: 604 Bytes

Versions: 1

Compression:

Stored size: 604 Bytes

Contents

require 'spec_helper'

describe "Sequel integration", if: sequel_present? do
  let(:db) { Sequel.sqlite }

  before do
    start_agent
  end

  context "with Sequel" do
    before { Appsignal::Transaction.create('uuid', Appsignal::Transaction::HTTP_REQUEST, 'test') }

    it "should instrument queries" do
      expect( Appsignal::Transaction.current ).to receive(:start_event)
        .at_least(:once)
      expect( Appsignal::Transaction.current ).to receive(:finish_event)
        .at_least(:once)
        .with("sql.sequel", nil, kind_of(String), 1)

      db['SELECT 1'].all.to_a
    end
  end
end

Version data entries

1 entries across 1 versions & 1 rubygems

Version Path
appsignal-1.2.0 spec/lib/appsignal/hooks/sequel_spec.rb