Sha256: 32a67fff4cbd1ab92e574f8cda50efafa4adb104755f9d47c99cef854708dcfa

Contents?: true

Size: 373 Bytes

Versions: 4

Compression:

Stored size: 373 Bytes

Contents

# frozen_string_literal: true

describe DDMetrics::BasicCounter do
  subject(:counter) { described_class.new }

  it 'starts at 0' do
    expect(counter.value).to eq(0)
  end

  describe '#increment' do
    subject { counter.increment }

    it 'increments' do
      expect { subject }
        .to change { counter.value }
        .from(0)
        .to(1)
    end
  end
end

Version data entries

4 entries across 4 versions & 1 rubygems

Version Path
ddmetrics-1.1.0 spec/ddmetrics/basic_counter_spec.rb
ddmetrics-1.0.1 spec/ddmetrics/basic_counter_spec.rb
ddmetrics-1.0.0 spec/ddmetrics/basic_counter_spec.rb
ddmetrics-1.0.0rc1 spec/ddmetrics/basic_counter_spec.rb