Sha256: 01ab92fc652715fa8cf383105863b280e5400e005aa9ae598205c0810ad0d065

Contents?: true

Size: 544 Bytes

Versions: 18

Compression:

Stored size: 544 Bytes

Contents

describe CC::Service::Invocation::WithMetrics, type: :service do
  class FakeInvocation
    def call
      raise CC::Service::HTTPError.new("Whoa", {})
    end
  end

  it "statsd error key" do
    statsd = double(:statsd)
    allow(statsd).to receive(:timing)
    expect(statsd).to receive(:increment).with("services.errors.githubpullrequests.cc-service-http_error")
    begin
      CC::Service::Invocation::WithMetrics.new(FakeInvocation.new, statsd, "githubpullrequests").call
    rescue CC::Service::HTTPError
      #noop
    end
  end
end

Version data entries

18 entries across 18 versions & 1 rubygems

Version Path
codeclimate-services-1.11.4 spec/cc/service/invocation/with_metrics_spec.rb
codeclimate-services-1.11.3 spec/cc/service/invocation/with_metrics_spec.rb
codeclimate-services-1.11.2 spec/cc/service/invocation/with_metrics_spec.rb
codeclimate-services-1.11.1 spec/cc/service/invocation/with_metrics_spec.rb
codeclimate-services-1.11.0 spec/cc/service/invocation/with_metrics_spec.rb
codeclimate-services-1.10.1 spec/cc/service/invocation/with_metrics_spec.rb
codeclimate-services-1.10.0 spec/cc/service/invocation/with_metrics_spec.rb
codeclimate-services-1.9.8 spec/cc/service/invocation/with_metrics_spec.rb
codeclimate-services-1.9.7 spec/cc/service/invocation/with_metrics_spec.rb
codeclimate-services-1.9.6 spec/cc/service/invocation/with_metrics_spec.rb
codeclimate-services-1.9.5 spec/cc/service/invocation/with_metrics_spec.rb
codeclimate-services-1.9.4 spec/cc/service/invocation/with_metrics_spec.rb
codeclimate-services-1.9.3 spec/cc/service/invocation/with_metrics_spec.rb
codeclimate-services-1.9.2 spec/cc/service/invocation/with_metrics_spec.rb
codeclimate-services-1.9.1 spec/cc/service/invocation/with_metrics_spec.rb
codeclimate-services-1.9.0 spec/cc/service/invocation/with_metrics_spec.rb
codeclimate-services-1.8.0 spec/cc/service/invocation/with_metrics_spec.rb
codeclimate-services-1.7.0 spec/cc/service/invocation/with_metrics_spec.rb