I have a rails app that when I run my tests I am creating new files in my /cov folder
Finished in 20.6 seconds
19 examples, 0 failures
Coverage report generated for RSpec to /Users/nicholasshook/Sites/<<my project>>/coverage. 264 / 446 LOC (59.19%) covered.
Done.
However, when I try going to localhost/coverage/index.html I get this error
No route matches [GET] "/coverage/index.html"
Thanks
If you're using SimpleCov or some similar gem to generate test results, those are static HTML files that are meant to be viewed locally on your machine. I.E. just browse to /Users/nicholasshook/Sites/<>/coverage/index.html and open that file in your browser.
Rails won't create routes to /coverage/index.html for security and manageability reasons. You can create a route to static html pages, but they must be in the /public directory. If you need your coverage results to be accessible in your app, you have a few options:
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With