Sha256: c20d7b502bb5e8ca590830fc17f53b2076e8eb7c6e8dc52463d1b50998853294

Contents?: true

Size: 583 Bytes

Versions: 1

Compression:

Stored size: 583 Bytes

Contents

require "spec_helper"

describe Redisrank::Result do

  it "should should initialize properly" do
    options = {:from => "from", :till => "till"}
    result = Redisrank::Result.new(options)
    result.from.should == "from"
    result.till.should == "till"
  end

  it "should have merge_to_max method" do
    result = Redisrank::Result.new
    result[:world].should be_nil
    result.merge_to_max(:world, 3)
    result[:world].should == 3
    result.merge_to_max(:world, 8)
    result[:world].should == 8
    result.merge_to_max(:world, 3)
    result[:world].should == 8
  end

end

Version data entries

1 entries across 1 versions & 1 rubygems

Version Path
redisrank-0.1.0 spec/result_spec.rb