Skip to content

Commit

Permalink
spec/support/rspec.rb: Delete duplicate code
Browse files Browse the repository at this point in the history
Also re-enable a "block length" rubocop check,
as the block is apparently short enough to pass again.
  • Loading branch information
DeeDeeG committed Oct 22, 2020
1 parent 8d7cee8 commit cd7f0b0
Showing 1 changed file with 0 additions and 7 deletions.
7 changes: 0 additions & 7 deletions spec/support/rspec.rb
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,6 @@

WebMock.disable_net_connect!(allow_localhost: true)

# rubocop:disable Metrics/BlockLength
RSpec.configure do |config|
config.include Locations

Expand All @@ -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.*$/)
Expand All @@ -54,4 +48,3 @@
.to_return(status: 200, body: 'false', headers: {})
end
end
# rubocop:enable Metrics/BlockLength

0 comments on commit cd7f0b0

Please sign in to comment.