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

minimum_coverage_by_file now prints the name of the violating file. #1103

Open
wants to merge 4 commits into
base: main
Choose a base branch
from
Open
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Next Next commit
added expectation of seeing file name in output
philipritchey committed Jul 29, 2024
commit c35ed283c450d441d23f29f62d32900af0e6dd8f
8 changes: 4 additions & 4 deletions features/minimum_coverage_by_file.feature
Original file line number Diff line number Diff line change
@@ -18,7 +18,7 @@ Feature:

When I run `bundle exec rake test`
Then the exit status should not be 0
And the output should contain "Line coverage by file (75.00%) is below the expected minimum coverage (75.01%)."
And the output should contain "Line coverage by file (75.00%) is below the expected minimum coverage (75.01%) in framework_specific.rb."
And the output should contain "SimpleCov failed with exit 2"

Scenario: Just passing it
@@ -48,8 +48,8 @@ Feature:

When I run `bundle exec rake test`
Then the exit status should not be 0
And the output should contain "Line coverage by file (80.00%) is below the expected minimum coverage (90.00%)."
And the output should contain "Branch coverage by file (50.00%) is below the expected minimum coverage (70.00%)."
And the output should contain "Line coverage by file (80.00%) is below the expected minimum coverage (90.00%) in some_class.rb."
And the output should contain "Branch coverage by file (50.00%) is below the expected minimum coverage (70.00%) in some_class.rb."
And the output should contain "SimpleCov failed with exit 2"

@branch_coverage
@@ -67,6 +67,6 @@ Feature:

When I run `bundle exec rake test`
Then the exit status should not be 0
And the output should contain "Branch coverage by file (50.00%) is below the expected minimum coverage (70.00%)."
And the output should contain "Branch coverage by file (50.00%) is below the expected minimum coverage (70.00%) in some_class.rb."
And the output should not contain "Line coverage"
And the output should contain "SimpleCov failed with exit 2"