-
Notifications
You must be signed in to change notification settings - Fork 2
Add post about code coverage for ruby on rails #186
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@etagwerker great article. What an interesting idea and topic! Just a few comments.
|
||
## Process | ||
|
||
In order to calculate code coverage, I used [SimpleCov](https://github.com/simplecov-ruby/simplecov) and |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I wonder if you should link to @lubc 's new article here.
In order to calculate code coverage, I used [SimpleCov](https://github.com/simplecov-ruby/simplecov) and | ||
analyzed Rails at [f22dd39](https://github.com/rails/rails/commit/f22dd39cb2adf85d3deeca61f9465206f7bd8df3). | ||
|
||
I didn't run the entire test suite from Rails's root directory, I went into |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
consider saying "the Rails"
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
or just "root directory"
When you run ActionCable you will need to increase your `ulimit` and you will | ||
need to have Redis running in your environment. | ||
|
||
Before running each test suite, I went ahead and added this snippet at the |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
consider removing "went ahead and"
|
||
I had to add the `SimpleCov.command_name` to make sure that all the test rake | ||
tasks are considered and automatically merged by `SimpleCov`. Without that line | ||
I was getting unexpected results when running more than one _test_ rake task (e.g. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
is the extra space after "e.g" there on purpose?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
no, I'll fix it
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
very thorough write up :)
Co-authored-by: Fiona <fionadlapham@gmail.com>
…ub.com:fastruby/blog into post/what-is-rails-code-coverage-per-component
I used [SimpleCov](https://github.com/simplecov-ruby/simplecov) and | ||
analyzed Rails at [f22dd39](https://github.com/rails/rails/commit/f22dd39cb2adf85d3deeca61f9465206f7bd8df3). | ||
|
||
<<<<<<< HEAD:_posts/2020-09-01-what-is-code-coverage-ruby-on-rails.md |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@etagwerker This seems to be a git conflict, so I'm not sure which sentence to review. Could you fix them before I proceed?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@cleicar Just addressed your comment. Good catch! 💯
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Way to go @etagwerker. This is a very interesting and thorough article! Thanks
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@etagwerker Looks like you added the article twice
@lubc oops, done. |
Hey,
This is a post about Ruby on Rails's code coverage. It comes with a static website to show some of my research: https://fastruby.github.io/coverage/
WIP: I still need to re-calculated some of the coverage data for the first components. During the process of writing this article, I realized that I had been using the wrong SimpleCov code (it wasn't automatically merging results for different commands) 😢Other than that,this article is ready for review.Please check it out.
Thanks!