From ee684a0973b2f5fbb30fcf2f1b3099564ca15ac9 Mon Sep 17 00:00:00 2001 From: Gabriel Mazetto Date: Fri, 19 Aug 2016 20:26:19 +0200 Subject: Remove useless `.and_call_origin` from specs --- spec/gitlab_net_spec.rb | 22 +++++----------------- 1 file changed, 5 insertions(+), 17 deletions(-) diff --git a/spec/gitlab_net_spec.rb b/spec/gitlab_net_spec.rb index 2cb97cb..d4585d2 100644 --- a/spec/gitlab_net_spec.rb +++ b/spec/gitlab_net_spec.rb @@ -276,19 +276,7 @@ describe GitlabNet, vcr: true do expect_any_instance_of(Redis).to receive(:initialize).with({ host: '127.0.0.1', port: 6379, - db: 0 }).and_call_original - gitlab_net.redis_client - end - end - - context "with host and port" do - it 'uses the specified host and port' do - allow(gitlab_net).to receive(:config).and_return(config) - allow(config).to receive(:redis).and_return( { 'host' => 'localhost', 'port' => 1123 } ) - - expect_any_instance_of(Redis).to receive(:initialize).with({ host: 'localhost', - port: 1123, - db: 0 }).and_call_original + db: 0 }) gitlab_net.redis_client end end @@ -301,13 +289,13 @@ describe GitlabNet, vcr: true do expect_any_instance_of(Redis).to receive(:initialize).with({ host: 'localhost', port: 1123, db: 0, - password: 'secret'}).and_call_original + password: 'secret'}) gitlab_net.redis_client end end context "with sentinels" do - it 'users the specified sentinels' do + it 'uses the specified sentinels' do allow(gitlab_net).to receive(:config).and_return(config) allow(config).to receive(:redis).and_return({ 'host' => 'localhost', 'port' => 1123, 'sentinels' => [{'host' => '127.0.0.1', 'port' => 26380}] }) @@ -315,7 +303,7 @@ describe GitlabNet, vcr: true do expect_any_instance_of(Redis).to receive(:initialize).with({ host: 'localhost', port: 1123, db: 0, - sentinels: [{host: '127.0.0.1', port: 26380}] }).and_call_original + sentinels: [{host: '127.0.0.1', port: 26380}] }) gitlab_net.redis_client end end @@ -328,7 +316,7 @@ describe GitlabNet, vcr: true do allow(gitlab_net).to receive(:config).and_return(config) allow(config).to receive(:redis).and_return( { 'socket' => socket }) - expect_any_instance_of(Redis).to receive(:initialize).with({ path: socket, db: 0 }).and_call_original + expect_any_instance_of(Redis).to receive(:initialize).with({ path: socket, db: 0 }) gitlab_net.redis_client end end -- cgit v1.2.1