Methods
D
T
Instance Public methods
draw(&block)
# File actionpack/test/dispatch/routing_test.rb, line 3643
def draw(&block)
  routes = ActionDispatch::Routing::RouteSet.new
  routes.draw(&block)
  @app = self.class.build_app routes
end
test_missing_action()
# File actionpack/test/dispatch/routing_test.rb, line 3658
def test_missing_action
  ex = assert_raises(ArgumentError) {
    assert_deprecated do
      draw do
        get '/foo/bar', :to => 'foo'
      end
    end
  }
  assert_match(/Missing :action/, ex.message)
end
test_missing_action_on_hash()
# File actionpack/test/dispatch/routing_test.rb, line 3669
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 3649
def test_missing_controller
  ex = assert_raises(ArgumentError) {
    draw do
      get '/foo/bar', :action => :index
    end
  }
  assert_match(/Missing :controller/, ex.message)
end
test_resources_with_valid_namespaced_controller_option()
# File actionpack/test/dispatch/routing_test.rb, line 3689
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 3678
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 3698
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 3710
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 3720
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