Sha256: ee1191baa63b532580627275d5705c47651645b3a6daff7153f606365ecf7e38

Contents?: true

Size: 450 Bytes

Versions: 8

Compression:

Stored size: 450 Bytes

Contents

require 'spec_helper'
require_relative 'shared_examples'

describe Riak::Crdt::InnerCounter do
  let(:parent){ double 'parent' }
  let(:counter_name){ 'counter name' }
  subject do
    described_class.new(parent, 0).tap do |c|
      c.name = counter_name
    end
  end

  include_examples 'Counter CRDT'

  it 'sends increments to the parent' do
    expect(parent).to receive(:increment).
      with(counter_name, 1)

    subject.increment
  end
end

Version data entries

8 entries across 8 versions & 2 rubygems

Version Path
riak-client-2.5.0 spec/riak/crdt/inner_counter_spec.rb
riak-client-2.3.0 spec/riak/crdt/inner_counter_spec.rb
riak-client-2.2.2 spec/riak/crdt/inner_counter_spec.rb
riak-client-2.2.1 spec/riak/crdt/inner_counter_spec.rb
riak-client-noenc-1.0.0 spec/riak/crdt/inner_counter_spec.rb
riak-client-2.2.0 spec/riak/crdt/inner_counter_spec.rb
riak-client-2.2.0.pre1 spec/riak/crdt/inner_counter_spec.rb
riak-client-2.1.0 spec/riak/crdt/inner_counter_spec.rb