Sha256: 826414ca175f0c641aac183ef8a75cf4e646946cafc14eba586bcdf420f32c2f
Contents?: true
Size: 682 Bytes
Versions: 2
Compression:
Stored size: 682 Bytes
Contents
# -*- coding: utf-8 -*- require 'spec_helper' class User include Redisable::KVSKey end describe Redisable::KVSKey do describe ".join_key" do context "Field name is not blank" do it "join with ':' specified key, id and name" do Redisable::KVSKey.join_key("user", "100", "status", false).should == "user:100:status" end end context "Field name is blank" do it "join with ':' specified key, id" do Redisable::KVSKey.join_key("user", "100", "status", true).should == "user:100" end end end describe "to include" do it "defined 'kvs_key' method" do defined?(User.kvs_key).should == "method" end end end
Version data entries
2 entries across 2 versions & 1 rubygems
Version | Path |
---|---|
redisable-0.0.2 | spec/kvs_key_spec.rb |
redisable-0.0.1 | spec/kvs_key_spec.rb |