Sha256: b2dd0ac023830949f5c7186528bdfdf877151760b693cf1cf912e6b829d0c99f

Contents?: true

Size: 586 Bytes

Versions: 2

Compression:

Stored size: 586 Bytes

Contents

require_relative 'test_helper'

class NullCollectorTest < MiniTest::Unit::TestCase
  attr_reader :statsd

  def setup
    @statsd = Harness::NullCollector.new
  end

  def test_respond_to_increment
    statsd.increment 'foo', 5, 0.5
  end

  def test_respond_to_decrement
    statsd.decrement 'foo', 5, 0.5
  end

  def test_responds_to_timing
    statsd.timing 'foo', 5, 0.5
  end

  def test_responds_to_gauge
    statsd.gauge 'foo', 5, 0.5
  end

  def test_runs_the_block_for_time
    result = statsd.time 'foo', 0.5 do
      'bar'
    end

    assert_equal 'bar', result
  end
end

Version data entries

2 entries across 2 versions & 1 rubygems

Version Path
harness-2.0.0 test/null_collector_test.rb
harness-1.0.2 test/null_collector_test.rb