Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Setup simplecov #2777

Merged
merged 1 commit into from
Oct 2, 2018
Merged

Conversation

sauloperez
Copy link
Contributor

@sauloperez sauloperez commented Sep 27, 2018

What? Why?

This enables code coverage analysis when running specs in your dev
environment. Simply run them as usual and you'll see a line like the
following at the end of the output:

Coverage report generated for RSpec to /home/pau/dev/openfoodnetwork/coverage

Simply browse to coverage/index.html and the results in a web UI.

This is a useful tool that helps you decide if the tests you added are
enough or not.

Screenshots

screenshot from 2018-09-27 15-58-40
screenshot from 2018-09-27 15-58-30

What should we test?

Nothing. This is for development only.

Release notes

Add SimpleCov to enable code coverage analysis.

Changelog Category: Added

This enables code coverage analysis when running specs in your dev
environment. Simply run them as usual and you'll see a line like the
following at the end of the output:

  Coverage report generated for RSpec to /home/pau/dev/openfoodnetwork/coverage

Simply browse to coverage/index.html and the results in a web UI.

This is a useful tool that helps you decide if the tests you added are
enough or not.
Copy link
Contributor

@luisramos0 luisramos0 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

nice!

any plugin to make rspec actually run? (instead of crawling I mean 😢)

@sauloperez
Copy link
Contributor Author

What do you mean? To get these screenshots I just did bundle exec rspec ...

@luisramos0
Copy link
Contributor

it was a joke, I meant: is there a plugin to make rspec itself faster? I think it is rather slow...

@sauloperez
Copy link
Contributor Author

What's slow is booting Rails and using ActiveRecord. You should use zeus which is stated somewhere in the docs. It is critical for my TDD cycles.

@luisramos0
Copy link
Contributor

OMG, I missed that one (it's not on macos sieera setup guide). I need to install that.

Copy link
Member

@kristinalim kristinalim left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This looks awesome, @sauloperez! 🙂

@sauloperez
Copy link
Contributor Author

sauloperez commented Sep 28, 2018

It'd be great to share our setups. I'm sure there are lots of tips we're missing from each other.

it's not on macos sieera setup guide

It should be in all!

@Tengoot
Copy link

Tengoot commented Sep 29, 2018

Deep-cover may be also a nice addition to this project. I usually use both Simplecov and DeepCover, I think it's worth consideration. So far I am happy with that setup for my own usage and DeepCover makes difference.

@sauloperez
Copy link
Contributor Author

Interesting @Tengoot!

@daniellemoorhead
Copy link
Contributor

@sauloperez #dotheadminplease
screen shot 2018-10-01 at 1 37 02 pm

@sauloperez
Copy link
Contributor Author

sorrryyyy

@sauloperez sauloperez merged commit aa78b9e into openfoodfoundation:master Oct 2, 2018
@sauloperez sauloperez deleted the setup-simplecov branch October 2, 2018 12:39
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

6 participants