Sha256: be1accc18a948b2f80c753ffa79400cb38d3953b22a265f750d373838f4b86a1
Contents?: true
Size: 785 Bytes
Versions: 23
Compression:
Stored size: 785 Bytes
Contents
require 'spec_helper' describe Appsignal::Hooks::SequelHook, if: sequel_present? do let(:db) { Sequel.sqlite } before :all do start_agent end its(:dependencies_present?) { should be_true } context "with a transaction" do it "should instrument queries" do Appsignal::Transaction.create('uuid', Appsignal::Transaction::HTTP_REQUEST, 'test') 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 describe Appsignal::Hooks::SequelHook, unless: sequel_present? do its(:dependencies_present?) { should be_false } end
Version data entries
23 entries across 23 versions & 1 rubygems