Sha256: 4b5a8e74d582fee5da8cfb09e00d49f5ac212c48711a04ec3f091d593e399b0c

Contents?: true

Size: 644 Bytes

Versions: 31

Compression:

Stored size: 644 Bytes

Contents

require 'spec_helper'

describe "Sequel integration", if: sequel_present? do
  let(:file) { File.expand_path('lib/appsignal/integrations/sequel.rb') }
  let(:db)   { Sequel.sqlite }

  before do
    load file
    start_agent
  end

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

    it "should instrument queries" do
      expect( Appsignal::Extension ).to receive(:start_event)
        .at_least(:once)
        .with('uuid')
      expect( Appsignal::Extension ).to receive(:finish_event)
        .at_least(:once)
        .with('uuid', "sql.sequel", "", "")

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

Version data entries

31 entries across 31 versions & 1 rubygems

Version Path
appsignal-0.12.beta.11 spec/lib/appsignal/integrations/sequel_spec.rb
appsignal-0.12.beta.9 spec/lib/appsignal/integrations/sequel_spec.rb
appsignal-0.12.beta.8 spec/lib/appsignal/integrations/sequel_spec.rb
appsignal-0.12.beta.7 spec/lib/appsignal/integrations/sequel_spec.rb
appsignal-0.12.beta.6 spec/lib/appsignal/integrations/sequel_spec.rb
appsignal-0.12.beta.5 spec/lib/appsignal/integrations/sequel_spec.rb
appsignal-0.12.beta.4 spec/lib/appsignal/integrations/sequel_spec.rb
appsignal-0.12.beta.3 spec/lib/appsignal/integrations/sequel_spec.rb
appsignal-0.12.beta.2 spec/lib/appsignal/integrations/sequel_spec.rb
appsignal-0.12.beta.1 spec/lib/appsignal/integrations/sequel_spec.rb
appsignal-0.12.beta.0 spec/lib/appsignal/integrations/sequel_spec.rb