Sha256: 4d95d5d9f753519e9c9f3ff74ccd6f53aa354b2b393a42e7c67e28899a578411

Contents?: true

Size: 503 Bytes

Versions: 1

Compression:

Stored size: 503 Bytes

Contents

require "spec_helper"

describe Redisrank::Scope do
  include Redisrank::Database

  before(:all) do
    db.flushdb
  end

  before(:each) do
    @name = "PageViews"
    @scope = Redisrank::Scope.new(@name)
  end

  it "should initialize properly" do
    @scope.to_s.should == @name
  end

  it "should increment next_id" do
    scope = Redisrank::Scope.new("Visitors")
    @scope.next_id.should == 1
    scope.next_id.should == 1
    @scope.next_id.should == 2
    scope.next_id.should == 2
  end

end

Version data entries

1 entries across 1 versions & 1 rubygems

Version Path
redisrank-0.1.0 spec/scope_spec.rb