Firing a controller's action from the console
ruby script/console irb> require 'action_controller/test_process' irb> require 'application' irb> require 'site_controller' irb> request = ActionController::TestRequest.new irb> response = ActionController::TestResponse.new irb> request.env['REQUEST_METHOD'] = 'GET' irb> request.action = "late_employee" irb> InfoController.process(request,response)
Basically, it's like getting inside of a TestUnit method, but you have to do the dirty work yourself.