class UrlOptionsIntegrationTest

Public Class Methods

call(env) click to toggle source
# File actionpack/test/controller/integration_test.rb, line 782
def self.call(env)
  routes.call(env)
end
routes() click to toggle source
# File actionpack/test/controller/integration_test.rb, line 778
def self.routes
  @routes ||= ActionDispatch::Routing::RouteSet.new
end

Public Instance Methods

app() click to toggle source
# File actionpack/test/controller/integration_test.rb, line 786
def app
  self.class
end
test_can_override_default_url_options() click to toggle source
# File actionpack/test/controller/integration_test.rb, line 817
def test_can_override_default_url_options
  original_host = default_url_options.dup

  default_url_options[:host] = "foobar.com"
  assert_equal "http://foobar.com/foo", foos_url

  get "/bar"
  assert_response :success
  assert_equal "http://foobar.com/foo", foos_url
ensure
  ActionDispatch::Integration::Session.default_url_options = self.default_url_options = original_host
end