Sha256: d6f2a044af3f1d14df431b22222a045b657bb3b32b2af09985229fd782eb51ee

Contents?: true

Size: 567 Bytes

Versions: 19

Compression:

Stored size: 567 Bytes

Contents

describe Appsignal::EventFormatter::ActiveRecord::InstantiationFormatter do
  let(:klass)     { Appsignal::EventFormatter::ActiveRecord::SqlFormatter }
  let(:formatter) { klass.new }

  it "should register sql.active_record" do
    Appsignal::EventFormatter.registered?('sql.active_record', klass).should be_true
  end

  describe "#format" do
    let(:payload) do
      {
        name: 'User load',
        sql: 'SELECT * FROM users'
      }
    end

    subject { formatter.format(payload) }

    it { should eq ['User load', 'SELECT * FROM users', 1] }
  end
end

Version data entries

19 entries across 19 versions & 1 rubygems

Version Path
appsignal-2.0.6 spec/lib/appsignal/event_formatter/active_record/sql_formatter_spec.rb
appsignal-2.0.5 spec/lib/appsignal/event_formatter/active_record/sql_formatter_spec.rb
appsignal-2.0.5.beta.1 spec/lib/appsignal/event_formatter/active_record/sql_formatter_spec.rb
appsignal-2.1.0.alpha.3 spec/lib/appsignal/event_formatter/active_record/sql_formatter_spec.rb
appsignal-2.1.0.alpha.2 spec/lib/appsignal/event_formatter/active_record/sql_formatter_spec.rb
appsignal-2.1.0.alpha.1 spec/lib/appsignal/event_formatter/active_record/sql_formatter_spec.rb
appsignal-2.0.4 spec/lib/appsignal/event_formatter/active_record/sql_formatter_spec.rb
appsignal-2.0.3 spec/lib/appsignal/event_formatter/active_record/sql_formatter_spec.rb
appsignal-2.0.2 spec/lib/appsignal/event_formatter/active_record/sql_formatter_spec.rb
appsignal-2.0.1 spec/lib/appsignal/event_formatter/active_record/sql_formatter_spec.rb
appsignal-2.0.0 spec/lib/appsignal/event_formatter/active_record/sql_formatter_spec.rb
appsignal-2.0.0.beta.1 spec/lib/appsignal/event_formatter/active_record/sql_formatter_spec.rb
appsignal-1.4.0.beta.1 spec/lib/appsignal/event_formatter/active_record/sql_formatter_spec.rb
appsignal-1.3.6 spec/lib/appsignal/event_formatter/active_record/sql_formatter_spec.rb
appsignal-1.3.6.beta.1 spec/lib/appsignal/event_formatter/active_record/sql_formatter_spec.rb
appsignal-1.3.5 spec/lib/appsignal/event_formatter/active_record/sql_formatter_spec.rb
appsignal-1.3.5.beta.1 spec/lib/appsignal/event_formatter/active_record/sql_formatter_spec.rb
appsignal-1.3.4 spec/lib/appsignal/event_formatter/active_record/sql_formatter_spec.rb
appsignal-1.3.3 spec/lib/appsignal/event_formatter/active_record/sql_formatter_spec.rb