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

uncover bug with minitest + shoulda-context + shoulda-matchers #132

Closed
wants to merge 2 commits into from

Conversation

anmarchenko
Copy link
Member

Fixes #130

What does this PR do?

There is a bug with minitest tests when using shoulda-context together with shoulda-matchers for tests like:

class CalculatorTest < Minitest::Test
  context "a calculator" do
    should delegate_method(:substract).to(:substractor)
  end
end

In this case test should delegate_method does not have an associated test_suite_id and is being skipped because it is not valid for test suite level visibility.

@codecov-commenter
Copy link

Codecov Report

Attention: Patch coverage is 97.87234% with 1 lines in your changes are missing coverage. Please review.

Project coverage is 99.07%. Comparing base (e016c07) to head (23199c3).

Files Patch % Lines
...g/ci/contrib/minitest_shoulda_context/fake_test.rb 96.15% 1 Missing ⚠️
Additional details and impacted files
@@            Coverage Diff             @@
##             main     #132      +/-   ##
==========================================
- Coverage   99.08%   99.07%   -0.01%     
==========================================
  Files         156      158       +2     
  Lines        7102     7149      +47     
  Branches      303      303              
==========================================
+ Hits         7037     7083      +46     
- Misses         65       66       +1     

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

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.

Invalid events being skipped when using with Minitest due to a missing test suite ID
2 participants