Sha256: 04f9c3601217367fe9674df808ea57023db86e485d168f8a4b69446f3f23f473
Contents?: true
Size: 888 Bytes
Versions: 8
Compression:
Stored size: 888 Bytes
Contents
require "rails_helper" require "serverengine" require "sneakers" require "sneakers/runner" require "external_sneaker" describe TestJob do include FileHelper include ActiveJob::TestHelper let(:metrics) { Sapience.add_appender(:datadog) } let(:tags) do %w(name:test queue:test_queue) end let(:message) do { title: "Cool", body: "Hot", } end let(:logger) { Sapience[described_class] } after do delete_file("config/sapience.yml") delete_file(described_class::VERIFICATION_FILE) end # TODO: Possible make this less flaky or run it with retry (rspec-retry) it "runs properly" do expect(metrics).to receive(:increment).with("activejob.perform", tags: tags) expect(metrics).to receive(:timing).with("activejob.perform.time", kind_of(Float), tags: tags) perform_enqueued_jobs do TestJob.perform_later end end end
Version data entries
8 entries across 8 versions & 1 rubygems