restarone / violet_rails

an app engine for your business. Seamlessly implement business logic with a powerful API. Out of the box CMS, blog, forum and email functionality. Developer friendly & easily extendable for your next SaaS/XaaS project. Built with Rails 6, Devise, Sidekiq & PostgreSQL
https://violet.restarone.solutions
MIT License
96 stars 44 forks source link

why is coverage 0% for some models? (eg: subdomain) #830

Closed donrestarone closed 2 years ago

donrestarone commented 2 years ago

Describe the bug

we expect to see more than 0% coverage in models like subdomain

To Reproduce

Run CI and download the coverage report.

Expected behavior

We have tests for these models (eg: test/models/subdomain_test.rb)

Screenshots

Screen Shot 2022-06-27 at 8 11 13 AM Screen Shot 2022-06-27 at 8 11 01 AM
donrestarone commented 2 years ago

@Pralish is in discussions with the community on the apartment repo: https://github.com/influitive/apartment/issues/220

PS @Pralish -- I believe we are using ros/apartment (https://github.com/rails-on-services/apartment) there may be changes on that repo that may have introduced this quirk

CC @alis-khadka

donrestarone commented 2 years ago

new research:

  1. https://github.com/simplecov-ruby/simplecov/issues/671
  2. add minimum coverage validation: https://stackoverflow.com/questions/39747715/make-travis-fail-if-the-coverage-is-not-above-a-threshold-ruby
  3. https://stackoverflow.com/posts/58702112/revisions