Permalink
Browse files

Add failing test case for #6053

  • Loading branch information...
1 parent 529a3ee commit 1c7bcde92d04d04510560a9eec5789422c709354 @pixeltrix pixeltrix committed Apr 29, 2012
Showing with 21 additions and 0 deletions.
  1. +21 −0 actionpack/test/controller/test_case_test.rb
@@ -886,3 +886,24 @@ def test_should_be_able_to_use_named_routes_before_a_request_is_done
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

0 comments on commit 1c7bcde

Please sign in to comment.