From 6bae8ce2bcff72ce8455481675faefe7f32db233 Mon Sep 17 00:00:00 2001 From: Jim Myhrberg Date: Sun, 28 Nov 2010 11:48:10 +0000 Subject: [PATCH] Updated Connection spec so the specs actually pass without a local Redis server running on the default port of 6379. --- spec/connection_spec.rb | 18 +++++++++--------- 1 file changed, 9 insertions(+), 9 deletions(-) diff --git a/spec/connection_spec.rb b/spec/connection_spec.rb index acc57d4..e5c1c24 100644 --- a/spec/connection_spec.rb +++ b/spec/connection_spec.rb @@ -38,20 +38,20 @@ describe Redistat::Connection do end it "should handle multiple connections with refs" do - Redistat.redis.client.port.should == 8379 - Redistat.connect(:port => 6379, :db => 15, :ref => "Custom") - Redistat.redis.client.port.should == 8379 - Redistat.redis("Custom").client.port.should == 6379 + Redistat.redis.client.db.should == 15 + Redistat.connect(:port => 8379, :db => 14, :ref => "Custom") + Redistat.redis.client.db.should == 15 + Redistat.redis("Custom").client.db.should == 14 end it "should be able to overwrite default and custom refs" do - Redistat.redis.client.port.should == 8379 - Redistat.connect(:port => 6379, :db => 15) - Redistat.redis.client.port.should == 6379 + Redistat.redis.client.db.should == 15 + Redistat.connect(:port => 8379, :db => 14) + Redistat.redis.client.db.should == 14 - Redistat.redis("Custom").client.port.should == 6379 + Redistat.redis("Custom").client.db.should == 14 Redistat.connect(:port => 8379, :db => 15, :ref => "Custom") - Redistat.redis("Custom").client.port.should == 8379 + Redistat.redis("Custom").client.db.should == 15 # Reset the default connection to the testing server or all hell # might brake loose from the rest of the specs