Methods
A
T
Included Modules
Constants
Routes = ActionDispatch::Routing::RouteSet.new.tap do |app| app.draw do ok = lambda { |env| [200, { 'Content-Type' => 'text/plain' }, []] } get '/integer', to: ok, constraints: { :port => 8080 } get '/string', to: ok, constraints: { :port => '8080' } get '/array', to: ok, constraints: { :port => [8080] } get '/regexp', to: ok, constraints: { :port => /8080/ } end end
 
APP = build_app Routes
 
Instance Public methods
app()
# File actionpack/test/dispatch/routing_test.rb, line 4425
def app; APP end
test_array_port_constraints()
# File actionpack/test/dispatch/routing_test.rb, line 4443
def test_array_port_constraints
  get 'http://www.example.com/array'
  assert_response :not_found

  get 'http://www.example.com:8080/array'
  assert_response :success
end
test_integer_port_constraints()
# File actionpack/test/dispatch/routing_test.rb, line 4427
def test_integer_port_constraints
  get 'http://www.example.com/integer'
  assert_response :not_found

  get 'http://www.example.com:8080/integer'
  assert_response :success
end
test_regexp_port_constraints()
# File actionpack/test/dispatch/routing_test.rb, line 4451
def test_regexp_port_constraints
  get 'http://www.example.com/regexp'
  assert_response :not_found

  get 'http://www.example.com:8080/regexp'
  assert_response :success
end
test_string_port_constraints()
# File actionpack/test/dispatch/routing_test.rb, line 4435
def test_string_port_constraints
  get 'http://www.example.com/string'
  assert_response :not_found

  get 'http://www.example.com:8080/string'
  assert_response :success
end