some spec cleanup

This commit is contained in:
2010-07-24 11:17:12 +03:00
parent a260faafa4
commit f8f2ece6e3
3 changed files with 5 additions and 11 deletions

View File

@@ -2,11 +2,11 @@ require "spec_helper"
describe Redistat do
before(:all) do
before(:each) do
db.flushdb
end
it "should have a valid redis client instance" do
it "should have a valid Redis client instance" do
db.should_not be_nil
end
@@ -16,7 +16,7 @@ describe Redistat do
end
it "should be able to set and get data" do
db.set "hello", "world"
db.set("hello", "world")
db.get("hello").should == "world"
db.del("hello").should be_true
end

View File

@@ -2,11 +2,8 @@ require "spec_helper"
describe Redistat::Event do
before(:all) do
db.flushdb
end
before(:each) do
db.flushdb
@scope = "PageViews"
@label = "about_us"
@label_hash = Digest::SHA1.hexdigest(@label)

View File

@@ -2,11 +2,8 @@ require "spec_helper"
describe Redistat::Label do
before(:all) do
db.flushdb
end
before(:each) do
db.flushdb
@name = "about_us"
@label = Redistat::Label.new(@name)
end