spec/support/feature_subdomain_helpers.rb
# Sets Capybara to use a given subdomain.
Sets Capybara to use a given subdomain.
Sets Capybara to use a given subdomain .
def within_subdomain(subdomain = 'admin')
    before { Capybara.default_host = "http://#{subdomain}.example.com" }
    after  { Capybara.default_host = 'http://www.example.com' }
    yield
  end
def within_subdomain ( subdomain = 'admin' ) before { Capybara . default_host = "http://#{subdomain}.example.com" } after { Capybara . default_host = 'http://www.example.com' } yield end
Sets Capybara to use a given subdomain.
Sets Capybara to use a given subdomain .
subdomain
<not_specific>