问题是我不能让它回答json格式的路由错误。我甚至无法拯救ActionController::RoutingError。$ curl -X GET http://localhost:3000/api/wrong_uri使用详细的选项:
$ curl -X GET http://localhost:3000> GET /api/wrong_uri HTTP/
在我的葡萄/Rails应用程序中,我已经在ApplicationController中实现了维护模式,所以当该模式处于活动状态时,它将从应用程序中的任何位置重定向到maintenance_mode_pathapi/v1/new_endpoint,而整个测试是在MaintenanceModeController中进行的?mode is active' do
context 'when current page is not maintenance page'