added standard redis key name constants

This commit is contained in:
2010-07-20 02:58:58 +03:00
parent de018d7348
commit 1daf8613dd
3 changed files with 9 additions and 4 deletions

View File

@@ -14,15 +14,15 @@ describe Redistat::Label do
label = Redistat::Label.new(name)
label.save
label.saved?.should be_true
redis.get("Redistat:lables:#{label.hash}").should == name
db.get("#{Redistat::KEY_LEBELS_PREFIX}#{label.hash}").should == name
name = "/contact/us"
label = Redistat::Label.create(name)
label.saved?.should be_true
redis.get("Redistat:lables:#{label.hash}").should == name
db.get("#{Redistat::KEY_LEBELS_PREFIX}#{label.hash}").should == name
end
def redis
def db
Redistat.redis
end