Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

coverage/index.html is not found after running rspec spec

require 'simplecov'
require 'simplecov-rcov'

included

SimpleCov.start 'rails'

in spec_helper.rb class and ran the rpec/spec . But after running that when I navigate to 0.0.0.0:3000/coverage/index.html um getting this error

Routing Error

No route matches [GET] "/coverage/index.html"

what can possibly go wrong in here? Thank you in advance.

like image 791
Gayan Kalanamith Avatar asked Oct 27 '25 15:10

Gayan Kalanamith


2 Answers

Instead of pasting the url into your browser, try running this in your terminal:

open coverage/index.html

See http://railscasts.com/episodes/252-metrics-metrics-metrics for more details.

like image 74
LFoos24 Avatar answered Oct 29 '25 04:10

LFoos24


Add the following to your Gemfile:

gem 'simplecov'
gem 'simplecov-rcov'

And run bundle install

like image 28
Konstantin Rudy Avatar answered Oct 29 '25 04:10

Konstantin Rudy



Donate For Us

If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!