Sha256: 0c9e6c26a7c99892838a7d8522c5ca47acf64a5c008326661b91ce3da175a6a9

Contents?: true

Size: 587 Bytes

Versions: 246

Compression:

Stored size: 587 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
    expect(Appsignal::EventFormatter.registered?("sql.active_record", klass)).to be_truthy
  end

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

    subject { formatter.format(payload) }

    it { is_expected.to eq ["User load", "SELECT * FROM users", 1] }
  end
end

Version data entries

246 entries across 246 versions & 1 rubygems

Version Path
appsignal-3.0.18-java spec/lib/appsignal/event_formatter/active_record/sql_formatter_spec.rb
appsignal-3.0.18 spec/lib/appsignal/event_formatter/active_record/sql_formatter_spec.rb
appsignal-3.0.17-java spec/lib/appsignal/event_formatter/active_record/sql_formatter_spec.rb
appsignal-3.0.17 spec/lib/appsignal/event_formatter/active_record/sql_formatter_spec.rb
appsignal-3.0.16-java spec/lib/appsignal/event_formatter/active_record/sql_formatter_spec.rb
appsignal-3.0.16 spec/lib/appsignal/event_formatter/active_record/sql_formatter_spec.rb
appsignal-3.0.15-java spec/lib/appsignal/event_formatter/active_record/sql_formatter_spec.rb
appsignal-3.0.15 spec/lib/appsignal/event_formatter/active_record/sql_formatter_spec.rb
appsignal-3.0.14-java spec/lib/appsignal/event_formatter/active_record/sql_formatter_spec.rb
appsignal-3.0.14 spec/lib/appsignal/event_formatter/active_record/sql_formatter_spec.rb
appsignal-3.0.13-java spec/lib/appsignal/event_formatter/active_record/sql_formatter_spec.rb
appsignal-3.0.13 spec/lib/appsignal/event_formatter/active_record/sql_formatter_spec.rb
appsignal-3.0.12-java spec/lib/appsignal/event_formatter/active_record/sql_formatter_spec.rb
appsignal-3.0.12 spec/lib/appsignal/event_formatter/active_record/sql_formatter_spec.rb
appsignal-3.0.11-java spec/lib/appsignal/event_formatter/active_record/sql_formatter_spec.rb
appsignal-3.0.11 spec/lib/appsignal/event_formatter/active_record/sql_formatter_spec.rb
appsignal-3.0.10-java spec/lib/appsignal/event_formatter/active_record/sql_formatter_spec.rb
appsignal-3.0.10 spec/lib/appsignal/event_formatter/active_record/sql_formatter_spec.rb
appsignal-2.11.10-java spec/lib/appsignal/event_formatter/active_record/sql_formatter_spec.rb
appsignal-2.11.10 spec/lib/appsignal/event_formatter/active_record/sql_formatter_spec.rb