Welcome to mirror list, hosted at ThFree Co, Russian Federation.

gitlab.com/gitlab-org/gitlab-foss.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorGitLab Bot <gitlab-bot@gitlab.com>2021-11-24 21:14:31 +0300
committerGitLab Bot <gitlab-bot@gitlab.com>2021-11-24 21:14:31 +0300
commit844eb8879aa445d8a5ee0f2ba3ee1ccf18319ef1 (patch)
tree051c632f870cbffd93efccda0711b3ae3a5885df /spec/support/redis
parentb8d516a6876de74b68a800c5b69af9448b0de140 (diff)
Add latest changes from gitlab-org/gitlab@master
Diffstat (limited to 'spec/support/redis')
-rw-r--r--spec/support/redis/redis_shared_examples.rb11
1 files changed, 8 insertions, 3 deletions
diff --git a/spec/support/redis/redis_shared_examples.rb b/spec/support/redis/redis_shared_examples.rb
index 72b3a72f9d4..4bee845453d 100644
--- a/spec/support/redis/redis_shared_examples.rb
+++ b/spec/support/redis/redis_shared_examples.rb
@@ -93,18 +93,23 @@ RSpec.shared_examples "redis_shared_examples" do
subject { described_class.new(rails_env).store }
shared_examples 'redis store' do
+ let(:redis_store) { ::Redis::Store }
+ let(:redis_store_to_s) { "Redis Client connected to #{host} against DB #{redis_database}" }
+
it 'instantiates Redis::Store' do
- is_expected.to be_a(::Redis::Store)
- expect(subject.to_s).to eq("Redis Client connected to #{host} against DB #{redis_database}")
+ is_expected.to be_a(redis_store)
+
+ expect(subject.to_s).to eq(redis_store_to_s)
end
context 'with the namespace' do
let(:namespace) { 'namespace_name' }
+ let(:redis_store_to_s) { "Redis Client connected to #{host} against DB #{redis_database} with namespace #{namespace}" }
subject { described_class.new(rails_env).store(namespace: namespace) }
it "uses specified namespace" do
- expect(subject.to_s).to eq("Redis Client connected to #{host} against DB #{redis_database} with namespace #{namespace}")
+ expect(subject.to_s).to eq(redis_store_to_s)
end
end
end