-
Notifications
You must be signed in to change notification settings - Fork 25
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
100% code coverage #62
Conversation
spec/memo_wise_spec.rb
Outdated
to eq(true) | ||
context "with private methods" do | ||
it "keeps private methods private" do | ||
expect(instance.private_methods.include?(:private_memowise_method)). |
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.
This might be clearer as
expect(instance.private_methods).to include(: private_memowise_method)
(And same comment below.) Thoughts?
spec/memo_wise_spec.rb
Outdated
instance.with_positional_and_keyword_args(2, b: 3) | ||
end).to all eq("with_positional_and_keyword_args: a=2, b=3") | ||
|
||
# This should be executed twice for each set of arguments passed, |
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.
This comment is a little confusing—it's really once for each set of arguments passed, which is twice total. Could you rephrase this?
@@ -20,7 +20,7 @@ | |||
|
|||
# SimpleCov.refuse_coverage_drop is only implemented for line coverage, so for | |||
# branch coverage we must use `minimum_coverage` | |||
SimpleCov.minimum_coverage branch: 90 | |||
SimpleCov.minimum_coverage branch: 100 |
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.
🎉
@@ -20,7 +20,7 @@ | |||
|
|||
# SimpleCov.refuse_coverage_drop is only implemented for line coverage, so for | |||
# branch coverage we must use `minimum_coverage` | |||
SimpleCov.minimum_coverage branch: 90 | |||
SimpleCov.minimum_coverage branch: 100 | |||
|
|||
SimpleCov.refuse_coverage_drop |
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 don't have strong feelings, but it might be more explicit if we changed this to also be 100
. Happy either way though!
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.
Going to leave as is for now!
I have a PR up on SimpleCov to hopefully get branch coverage working for :refuse_coverage_drop
, so hoping to just use refuse_coverage_drop for both eventually.
Codecov Report
@@ Coverage Diff @@
## main #62 +/- ##
===========================================
+ Coverage 98.06% 100.00% +1.93%
===========================================
Files 2 2
Lines 413 451 +38
===========================================
+ Hits 405 451 +46
+ Misses 8 0 -8
Continue to review full report at Codecov.
|
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.
LGTM
Adds specs to ensure we're at 100% code coverage, and mandates 100% branch coverage moving forward.
Resolves #56