Updated

spec/support / ssl.rb

A
22 lines of codes
0 methods
N/A complexity/method
3 churn
0.0 complexity
21 duplications
RSpec.configure do |config| config.before(:each, type: :controller) do |example| if example.metadata[:admin] request.env['HTTP_HOST'] = Site.moderate_host else request.env['HTTP_HOST'] = Site.host end request.env['SERVER_PORT'] = Site.port request.env['HTTPS'] = 'on' end config.before(:each, type: :request) do |example|
  1. Similar code found in 2 nodes Locations: 0 1
if example.metadata[:admin] host! Site.moderate_host_with_port else host! Site.host_with_port end https! end end