Sha256: 96dc4e1d2219c91f157a13e45caccfff17d8d0fdd17afec3fc91ee45f8272fe1
Contents?: true
Size: 451 Bytes
Versions: 8
Compression:
Stored size: 451 Bytes
Contents
require "rails_helper" RSpec.describe Post, type: :model do let!(:metrics) { Sapience.add_appender(:datadog, app_name: "active_record") } let(:tags) { %w(query:post.load) } before(:each) { create :post } it "records som sql metrics" do expect(metrics).to receive(:increment).with("activerecord.sql", tags: tags) expect(metrics).to receive(:timing).with("activerecord.sql.time", kind_of(Float), tags: tags) Post.first end end
Version data entries
8 entries across 8 versions & 1 rubygems