From cd7f0b0926646e590f9ad999c9e47beb1d6e9962 Mon Sep 17 00:00:00 2001 From: DeeDeeG Date: Thu, 22 Oct 2020 14:11:25 -0400 Subject: [PATCH] spec/support/rspec.rb: Delete duplicate code Also re-enable a "block length" rubocop check, as the block is apparently short enough to pass again. --- spec/support/rspec.rb | 7 ------- 1 file changed, 7 deletions(-) diff --git a/spec/support/rspec.rb b/spec/support/rspec.rb index e5184112..2ce2f539 100644 --- a/spec/support/rspec.rb +++ b/spec/support/rspec.rb @@ -18,7 +18,6 @@ WebMock.disable_net_connect!(allow_localhost: true) -# rubocop:disable Metrics/BlockLength RSpec.configure do |config| config.include Locations @@ -38,11 +37,6 @@ .to_return(status: 200, body: recaptcha_response.to_json, headers: { 'Content-Type' => 'application/json' }) - recaptcha_response = { 'success' => true } - stub_request(:post, 'https://www.google.com/recaptcha/api/siteverify') - .to_return(status: 200, body: recaptcha_response.to_json, - headers: { 'Content-Type' => 'application/json' }) - # Akismet response for spam stub_request(:post, /.*.rest.akismet.com\/1.1\/comment-check/) .with(body: /^.*Spam.*$/) @@ -54,4 +48,3 @@ .to_return(status: 200, body: 'false', headers: {}) end end -# rubocop:enable Metrics/BlockLength