Skip to content
Browse files

Added few specs

  • Loading branch information...
1 parent 36afa66 commit 82fc02a0580191ad20bafd3ad5b042520003613d Luca Guidi committed
Showing with 10 additions and 2 deletions.
  1. +10 −2 spec/redis_spec.rb
View
12 spec/redis_spec.rb
@@ -29,7 +29,11 @@ def ==(other)
@r.quit
end
- it 'should be able to PING' do
+ it "should be able connect without a timeout" do
+ lambda { Redis.new :timeout => 0 }.should_not raise_error
+ end
+
+ it "should be able to PING" do
@r.ping.should == 'PONG'
end
@@ -369,7 +373,11 @@ def ==(other)
@r.flushdb
@r.keys('*').should == []
end
- #
+ #
+ it "should raise exception when manually try to change the database" do
+ lambda { @r.select(0) }.should raise_error
+ end
+ #
it "should be able to provide the last save time (LASTSAVE)" do
savetime = @r.lastsave
Time.at(savetime).class.should == Time

0 comments on commit 82fc02a

Please sign in to comment.
Something went wrong with that request. Please try again.