Sha256: 0e17c35b12353bb77bb3f232953fa4abae25fa49da9ead478b3b1b1ac909b8a4

Contents?: true

Size: 584 Bytes

Versions: 69

Compression:

Stored size: 584 Bytes

Contents

require 'spec_helper'

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

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

  describe "#format" do
    let(:payload) do
      {
        record_count: 1,
        class_name: 'User'
      }
    end

    subject { formatter.format(payload) }

    it { should == ['User', nil] }
  end
end

Version data entries

69 entries across 69 versions & 1 rubygems

Version Path
appsignal-1.3.1 spec/lib/appsignal/event_formatter/active_record/instantiation_formatter_spec.rb
appsignal-1.3.0 spec/lib/appsignal/event_formatter/active_record/instantiation_formatter_spec.rb
appsignal-1.3.0.beta.3 spec/lib/appsignal/event_formatter/active_record/instantiation_formatter_spec.rb
appsignal-1.3.0.beta.2 spec/lib/appsignal/event_formatter/active_record/instantiation_formatter_spec.rb
appsignal-1.3.0.beta.1 spec/lib/appsignal/event_formatter/active_record/instantiation_formatter_spec.rb
appsignal-1.2.5 spec/lib/appsignal/event_formatter/active_record/instantiation_formatter_spec.rb
appsignal-1.2.4 spec/lib/appsignal/event_formatter/active_record/instantiation_formatter_spec.rb
appsignal-1.2.4.beta.4 spec/lib/appsignal/event_formatter/active_record/instantiation_formatter_spec.rb
appsignal-1.2.4.beta.3 spec/lib/appsignal/event_formatter/active_record/instantiation_formatter_spec.rb
appsignal-1.2.4.beta.2 spec/lib/appsignal/event_formatter/active_record/instantiation_formatter_spec.rb
appsignal-1.2.4.beta.1 spec/lib/appsignal/event_formatter/active_record/instantiation_formatter_spec.rb
appsignal-1.2.3 spec/lib/appsignal/event_formatter/active_record/instantiation_formatter_spec.rb
appsignal-1.2.3.beta.3 spec/lib/appsignal/event_formatter/active_record/instantiation_formatter_spec.rb
appsignal-1.2.3.beta.2 spec/lib/appsignal/event_formatter/active_record/instantiation_formatter_spec.rb
appsignal-1.2.3.beta.1 spec/lib/appsignal/event_formatter/active_record/instantiation_formatter_spec.rb
appsignal-1.2.2 spec/lib/appsignal/event_formatter/active_record/instantiation_formatter_spec.rb
appsignal-1.2.1 spec/lib/appsignal/event_formatter/active_record/instantiation_formatter_spec.rb
appsignal-1.2.1.beta.3 spec/lib/appsignal/event_formatter/active_record/instantiation_formatter_spec.rb
appsignal-1.2.1.beta.2 spec/lib/appsignal/event_formatter/active_record/instantiation_formatter_spec.rb
appsignal-1.2.1.beta.1 spec/lib/appsignal/event_formatter/active_record/instantiation_formatter_spec.rb