I\'m getting a similar error in a number of tests when I add \":js => true\" to them. eg:
An error occurred in an after hook
ActionController::Rout
In my case, I am getting
Failure/Error: Unable to find matching line from backtrace
ActionController::RoutingError:
No route matches [GET] "/favicon.ico"
I have already put an empty file favicon.ico under app/assets/images, so the development server is fine. But the test environment doesn't know how to handle the assets in this case. The workaround I found was to turn on static serving (instead of using a different server to serve static assets). The penalty of course is the performance.
in environments/test.rb, set
config.serve_static_assets = true # default is false