summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--spec/gitlab_config_spec.rb16
1 files changed, 11 insertions, 5 deletions
diff --git a/spec/gitlab_config_spec.rb b/spec/gitlab_config_spec.rb
index 5c56540..52fb182 100644
--- a/spec/gitlab_config_spec.rb
+++ b/spec/gitlab_config_spec.rb
@@ -46,11 +46,6 @@ eos
describe :redis_command do
subject { config.redis_command }
- it { should be_an(Array) }
- it { should include(config.redis['host']) }
- it { should include(config.redis['bin']) }
- it { should include(config.redis['port'].to_s) }
-
context "with empty redis config" do
before do
config.stub(:redis) { {} }
@@ -60,6 +55,17 @@ eos
it { should include('redis-cli') }
end
+ context "with host and port" do
+ before do
+ config.stub(:redis) { {'host' => 'localhost', 'port' => 1123, 'bin' => '/usr/bin/redis-cli'} }
+ end
+
+ it { should be_an(Array) }
+ it { should include(config.redis['host']) }
+ it { should include(config.redis['bin']) }
+ it { should include(config.redis['port'].to_s) }
+ end
+
context "with redis socket" do
let(:socket) { '/tmp/redis.socket' }
before do