Spirit
Spirit

Reputation: 307

Rspec: How to show coverage of testing file

I want to show coverage of only one file which I'm running test on.

For example, I'm running test on a controller file and this file has 100 line of code (LOC). But when I run test script I received message

Coverage report generated for RSpec to /myapp/coverage. 3245 / 4141 LOC (78.36%) covered.

I think 4141 LOC is number of the line code in all file of my source. What should I do to receive expect message like:

Coverage report generated for RSpec to /myapp/coverage. xx / 100 LOC (yy.zz%) covered.

Upvotes: 0

Views: 2944

Answers (1)

Greg
Greg

Reputation: 6649

Check out inside /myapp/coverage (probably index.html file if I remeber correctly) there should be the whole report generated in HTML, where you can check by models, controllers and files.

Upvotes: 1

Related Questions