Sha256: cb1d1d0d92c97223d537b93a4a4a02301e97eb4172ae03074ba5d9046e0ab5a5

Contents?: true

Size: 528 Bytes

Versions: 20

Compression:

Stored size: 528 Bytes

Contents

# encoding: UTF-8

require File.expand_path('../helper', __FILE__)

class WithMetrics < CC::Service::TestCase

  class FakeInvocation
    def call
      raise CC::Service::HTTPError.new("Whoa", {})
    end
  end

  def test_statsd_error_key
    statsd = Object.new
    statsd.stubs(:timing)
    statsd.expects("increment").with("services.errors.githubpullrequests.cc-service-http_error")
    CC::Service::Invocation::WithMetrics.new(FakeInvocation.new, statsd, "githubpullrequests").call rescue CC::Service::HTTPError
  end
end

Version data entries

20 entries across 20 versions & 1 rubygems

Version Path
codeclimate-services-1.6.1 test/with_metrics_test.rb
codeclimate-services-1.6.0 test/with_metrics_test.rb
codeclimate-services-1.5.1 test/with_metrics_test.rb
codeclimate-services-1.5.0 test/with_metrics_test.rb
codeclimate-services-1.4.0 test/with_metrics_test.rb
codeclimate-services-1.3.0 test/with_metrics_test.rb
codeclimate-services-1.2.0 test/with_metrics_test.rb
codeclimate-services-1.1.0 test/with_metrics_test.rb
codeclimate-services-1.0.1 test/with_metrics_test.rb
codeclimate-services-1.0.0 test/with_metrics_test.rb
codeclimate-services-0.6.2 test/with_metrics_test.rb
codeclimate-services-0.6.1 test/with_metrics_test.rb
codeclimate-services-0.6.0 test/with_metrics_test.rb
codeclimate-services-0.5.3 test/with_metrics_test.rb
codeclimate-services-0.5.2 test/with_metrics_test.rb
codeclimate-services-0.5.1 test/with_metrics_test.rb
codeclimate-services-0.5.0 test/with_metrics_test.rb
codeclimate-services-0.4.1 test/with_metrics_test.rb
codeclimate-services-0.4.0 test/with_metrics_test.rb
codeclimate-services-0.3.0 test/with_metrics_test.rb