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-2.11.2-java spec/lib/appsignal/event_formatter/active_record/sql_formatter_spec.rb
appsignal-2.11.2 spec/lib/appsignal/event_formatter/active_record/sql_formatter_spec.rb
appsignal-2.11.1-java spec/lib/appsignal/event_formatter/active_record/sql_formatter_spec.rb
appsignal-2.11.1 spec/lib/appsignal/event_formatter/active_record/sql_formatter_spec.rb
appsignal-2.11.1.beta.2 spec/lib/appsignal/event_formatter/active_record/sql_formatter_spec.rb
appsignal-2.11.1.beta.2-java spec/lib/appsignal/event_formatter/active_record/sql_formatter_spec.rb
appsignal-2.11.0-java spec/lib/appsignal/event_formatter/active_record/sql_formatter_spec.rb
appsignal-2.11.0 spec/lib/appsignal/event_formatter/active_record/sql_formatter_spec.rb
appsignal-2.10.12 spec/lib/appsignal/event_formatter/active_record/sql_formatter_spec.rb
appsignal-2.10.12-java spec/lib/appsignal/event_formatter/active_record/sql_formatter_spec.rb
appsignal-2.11.0.beta.5 spec/lib/appsignal/event_formatter/active_record/sql_formatter_spec.rb
appsignal-2.11.0.beta.5-java spec/lib/appsignal/event_formatter/active_record/sql_formatter_spec.rb
appsignal-2.10.11 spec/lib/appsignal/event_formatter/active_record/sql_formatter_spec.rb
appsignal-2.10.11-java spec/lib/appsignal/event_formatter/active_record/sql_formatter_spec.rb
appsignal-2.11.0.beta.4 spec/lib/appsignal/event_formatter/active_record/sql_formatter_spec.rb
appsignal-2.11.0.beta.4-java spec/lib/appsignal/event_formatter/active_record/sql_formatter_spec.rb
appsignal-2.11.0.beta.3 spec/lib/appsignal/event_formatter/active_record/sql_formatter_spec.rb
appsignal-2.11.0.beta.3-java spec/lib/appsignal/event_formatter/active_record/sql_formatter_spec.rb
appsignal-2.10.10 spec/lib/appsignal/event_formatter/active_record/sql_formatter_spec.rb
appsignal-2.10.10-java spec/lib/appsignal/event_formatter/active_record/sql_formatter_spec.rb