Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Browse files

Add failing test case for #6053

  • Loading branch information...
commit 1c7bcde92d04d04510560a9eec5789422c709354 1 parent 529a3ee
@pixeltrix pixeltrix authored
Showing with 21 additions and 0 deletions.
  1. +21 −0 actionpack/test/controller/test_case_test.rb
View
21 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
Please sign in to comment.
Something went wrong with that request. Please try again.