aboutsummaryrefslogtreecommitdiffstats
path: root/actionpack
diff options
context:
space:
mode:
authorAndrew White <andyw@pixeltrix.co.uk>2012-04-29 20:18:22 +0100
committerAndrew White <andyw@pixeltrix.co.uk>2012-04-29 20:20:59 +0100
commit1c7bcde92d04d04510560a9eec5789422c709354 (patch)
treecc9e287de2918dd0f39e3307ebf489fe4a206d6a /actionpack
parent529a3ee50eeb7db5a78afeb5da38fd71b42e7ea2 (diff)
downloadrails-1c7bcde92d04d04510560a9eec5789422c709354.tar.gz
rails-1c7bcde92d04d04510560a9eec5789422c709354.tar.bz2
rails-1c7bcde92d04d04510560a9eec5789422c709354.zip
Add failing test case for #6053
Diffstat (limited to 'actionpack')
-rw-r--r--actionpack/test/controller/test_case_test.rb21
1 files changed, 21 insertions, 0 deletions
diff --git a/actionpack/test/controller/test_case_test.rb b/actionpack/test/controller/test_case_test.rb
index 6c176b5144..0d6d303b51 100644
--- a/actionpack/test/controller/test_case_test.rb
+++ b/actionpack/test/controller/test_case_test.rb
@@ -886,3 +886,24 @@ class NamedRoutesControllerTest < ActionController::TestCase
end
end
end
+
+class AnonymousControllerTest < ActionController::TestCase
+ def setup
+ @controller = Class.new(ActionController::Base) do
+ def index
+ render :text => params[:controller]
+ end
+ end.new
+
+ @routes = ActionDispatch::Routing::RouteSet.new.tap do |r|
+ r.draw do
+ get ':controller(/:action(/:id))'
+ end
+ end
+ end
+
+ def test_controller_name
+ get :index
+ assert_equal 'anonymous', @response.body
+ end
+end \ No newline at end of file