Sha256: e2a722c680410f116042accb56b35be95d856a126d67eea09658826772b8aedf

Contents?: true

Size: 518 Bytes

Versions: 9

Compression:

Stored size: 518 Bytes

Contents

require "spec_helper"
require "cascade/statistics_stores/abstract_store"
require "cascade/statistics_stores/counter_store"

describe Cascade::StatisticsStores::CounterStore do
  subject { Cascade::StatisticsStores::CounterStore.new }

  context "on initialization" do
    it "use empty array as default value" do
      assert_equal subject.store, 0
    end
  end

  it "add value to array on update" do
    previous_value = subject.store
    subject.update
    assert_equal subject.store, previous_value + 1
  end
end

Version data entries

9 entries across 9 versions & 1 rubygems

Version Path
cascade-rb-0.2.3 spec/lib/statistics_stores/counter_store_spec.rb
cascade-rb-0.2.2 spec/lib/statistics_stores/counter_store_spec.rb
cascade-rb-0.2.1 spec/lib/statistics_stores/counter_store_spec.rb
cascade-rb-0.2.0 spec/lib/statistics_stores/counter_store_spec.rb
cascade-rb-0.1.5 spec/lib/statistics_stores/counter_store_spec.rb
cascade-rb-0.1.4 spec/lib/statistics_stores/counter_store_spec.rb
cascade-rb-0.1.2 spec/lib/statistics_stores/counter_store_spec.rb
cascade-rb-0.1.1 spec/lib/statistics_stores/counter_store_spec.rb
cascade-rb-0.1.0 spec/lib/statistics_stores/counter_store_spec.rb