diff options
author | Dmitriy Zaporozhets <dmitriy.zaporozhets@gmail.com> | 2014-09-16 10:38:23 +0300 |
---|---|---|
committer | Dmitriy Zaporozhets <dmitriy.zaporozhets@gmail.com> | 2014-09-16 10:38:23 +0300 |
commit | 17dab64aa8bd7a6fc4ce9e2a389fb6f5968b5ba5 (patch) | |
tree | 2890a3d3ea06b6b6f708a96df4380fb0874b5528 /spec/gitlab_config_spec.rb | |
parent | d951957348db442399c257e4fdcd55200b3316c6 (diff) | |
download | gitlab-shell-17dab64aa8bd7a6fc4ce9e2a389fb6f5968b5ba5.tar.gz |
Improve gitlab config tests
Signed-off-by: Dmitriy Zaporozhets <dmitriy.zaporozhets@gmail.com>
Diffstat (limited to 'spec/gitlab_config_spec.rb')
-rw-r--r-- | spec/gitlab_config_spec.rb | 16 |
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 |