Methods
D
T
Instance Public methods
draw(&block)
# File actionpack/test/dispatch/routing_test.rb, line 3814
def draw(&block)
  routes = ActionDispatch::Routing::RouteSet.new
  routes.draw(&block)
  @app = self.class.build_app routes
end
test_missing_action_on_hash()
# File actionpack/test/dispatch/routing_test.rb, line 3838
def test_missing_action_on_hash
  ex = assert_raises(ArgumentError) {
    draw do
      get '/foo/bar', :to => 'foo#'
    end
  }
  assert_match(/Missing :action/, ex.message)
end
test_missing_controller()
# File actionpack/test/dispatch/routing_test.rb, line 3820
def test_missing_controller
  ex = assert_raises(ArgumentError) {
    draw do
      get '/foo/bar', :action => :index
    end
  }
  assert_match(/Missing :controller/, ex.message)
end
test_missing_controller_with_to()
# File actionpack/test/dispatch/routing_test.rb, line 3829
def test_missing_controller_with_to
  ex = assert_raises(ArgumentError) {
    draw do
      get '/foo/bar', :to => 'foo'
    end
  }
  assert_match(/Missing :controller/, ex.message)
end
test_resources_with_valid_namespaced_controller_option()
# File actionpack/test/dispatch/routing_test.rb, line 3858
def test_resources_with_valid_namespaced_controller_option
  draw do
    resources :storage_files, :controller => 'admin/storage_files'
  end

  get '/storage_files'
  assert_equal "admin/storage_files#index", @response.body
end
test_valid_controller_options_inside_namespace()
# File actionpack/test/dispatch/routing_test.rb, line 3847
def test_valid_controller_options_inside_namespace
  draw do
    namespace :admin do
      resources :storage_files, :controller => "storage_files"
    end
  end

  get '/admin/storage_files'
  assert_equal "admin/storage_files#index", @response.body
end
test_warn_with_ruby_constant_syntax_controller_option()
# File actionpack/test/dispatch/routing_test.rb, line 3867
def test_warn_with_ruby_constant_syntax_controller_option
  e = assert_raise(ArgumentError) do
    draw do
      namespace :admin do
        resources :storage_files, :controller => "StorageFiles"
      end
    end
  end

  assert_match "'admin/StorageFiles' is not a supported controller name", e.message
end
test_warn_with_ruby_constant_syntax_namespaced_controller_option()
# File actionpack/test/dispatch/routing_test.rb, line 3879
def test_warn_with_ruby_constant_syntax_namespaced_controller_option
  e = assert_raise(ArgumentError) do
    draw do
      resources :storage_files, :controller => 'Admin::StorageFiles'
    end
  end

  assert_match "'Admin::StorageFiles' is not a supported controller name", e.message
end
test_warn_with_ruby_constant_syntax_no_colons()
# File actionpack/test/dispatch/routing_test.rb, line 3889
def test_warn_with_ruby_constant_syntax_no_colons
  e = assert_raise(ArgumentError) do
    draw do
      resources :storage_files, :controller => 'Admin'
    end
  end

  assert_match "'Admin' is not a supported controller name", e.message
end