Sha256: ed0d48caf5199ba82cd93c7f3f305fce4f82f84d310619916ace7db5d26e625c

Contents?: true

Size: 477 Bytes

Versions: 5

Compression:

Stored size: 477 Bytes

Contents

require File.dirname(__FILE__) + '/spec_helper.rb'

describe "redis lists" do

  it "should read and write" do
    @onion.sales.count.should == 0

    @onion.sales << %w( to-bill to-tom to-bill to-bob to-tom )
    @onion.sales.count.should == 5
    @onion.sales.to_a.should == %w( to-bill to-tom to-bill to-bob to-tom )

    @onion.sales.delete("to-bill").should == 2
    @onion.sales.delete("to-bob").should == 1
    @onion.sales.to_a.should == %w( to-tom to-tom )
  end

end

Version data entries

5 entries across 5 versions & 1 rubygems

Version Path
blendris-0.5 spec/list_spec.rb
blendris-0.0.4 spec/list_spec.rb
blendris-0.0.3 spec/list_spec.rb
blendris-0.0.2 spec/list_spec.rb
blendris-0.0.1 spec/list_spec.rb