diff options
author | Jeremy Kemper <jeremy@bitsweat.net> | 2007-12-15 02:29:04 +0000 |
---|---|---|
committer | Jeremy Kemper <jeremy@bitsweat.net> | 2007-12-15 02:29:04 +0000 |
commit | f85089aabbbb5fe218e27479081b7c745b3f8f94 (patch) | |
tree | 52b57fcf0de72fa536736f528add4a6e2541b2bf /actionpack/test | |
parent | 11dde5ca2fc81a785fd5234f8aeb2e7f98980939 (diff) | |
download | rails-f85089aabbbb5fe218e27479081b7c745b3f8f94.tar.gz rails-f85089aabbbb5fe218e27479081b7c745b3f8f94.tar.bz2 rails-f85089aabbbb5fe218e27479081b7c745b3f8f94.zip |
Fixes for standalone tests
git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@8406 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
Diffstat (limited to 'actionpack/test')
-rw-r--r-- | actionpack/test/controller/request_test.rb | 1 | ||||
-rw-r--r-- | actionpack/test/controller/routing_test.rb | 12 |
2 files changed, 10 insertions, 3 deletions
diff --git a/actionpack/test/controller/request_test.rb b/actionpack/test/controller/request_test.rb index 76c8604c50..39ec2b47c1 100644 --- a/actionpack/test/controller/request_test.rb +++ b/actionpack/test/controller/request_test.rb @@ -1,4 +1,5 @@ require File.dirname(__FILE__) + '/../abstract_unit' +require 'action_controller/integration' class RequestTest < Test::Unit::TestCase def setup diff --git a/actionpack/test/controller/routing_test.rb b/actionpack/test/controller/routing_test.rb index 8f3709de3d..281ef13b31 100644 --- a/actionpack/test/controller/routing_test.rb +++ b/actionpack/test/controller/routing_test.rb @@ -2,6 +2,12 @@ require "#{File.dirname(__FILE__)}/../abstract_unit" require "#{File.dirname(__FILE__)}/fake_controllers" require 'action_controller/routing' +class MilestonesController < ActionController::Base + def index() head :ok end + alias_method :show, :index + def rescue_action(e) raise e end +end + RunTimeTests = ARGV.include? 'time' ROUTING = ActionController::Routing @@ -2023,14 +2029,14 @@ class RouteSetTest < Test::Unit::TestCase def test_named_route_in_nested_resource set.draw do |map| map.resources :projects do |project| - project.comments 'comments', :controller => 'comments', :action => 'index' + project.milestones 'milestones', :controller => 'milestones', :action => 'index' end end - request.path = "/projects/1/comments" + request.path = "/projects/1/milestones" request.method = :get assert_nothing_raised { set.recognize(request) } - assert_equal("comments", request.path_parameters[:controller]) + assert_equal("milestones", request.path_parameters[:controller]) assert_equal("index", request.path_parameters[:action]) end |