Sha256: bac8ed858aa9c3d011cd2a88af57b2a5a64ee01e29837734dc1324a3c187c0c5
Contents?: true
Size: 620 Bytes
Versions: 26
Compression:
Stored size: 620 Bytes
Contents
require 'test_helper' class HelpersTest < Minitest::Test def setup test_class = Class.new(Minitest::Test) test_class.send(:include, StatsD::Instrument::Helpers) @test_case = test_class.new('fake') end def test_capture_metrics_inside_block_only StatsD.increment('counter') metrics = @test_case.capture_statsd_calls do StatsD.increment('counter') StatsD.gauge('gauge', 12) end StatsD.gauge('gauge', 15) assert_equal 2, metrics.length assert_equal 'counter', metrics[0].name assert_equal 'gauge', metrics[1].name assert_equal 12, metrics[1].value end end
Version data entries
26 entries across 26 versions & 2 rubygems