提交 1c7bcde9 编写于 作者: A Andrew White

Add failing test case for #6053

上级 529a3ee5
......@@ -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
\ No newline at end of file
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册