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

100% code coverage #62

Merged
merged 2 commits into from
Oct 12, 2020
Merged

100% code coverage #62

merged 2 commits into from
Oct 12, 2020

Conversation

jemmaissroff
Copy link
Contributor

Adds specs to ensure we're at 100% code coverage, and mandates 100% branch coverage moving forward.

Resolves #56

to eq(true)
context "with private methods" do
it "keeps private methods private" do
expect(instance.private_methods.include?(:private_memowise_method)).
Copy link
Member

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?

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,
Copy link
Member

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
Copy link
Member

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
Copy link
Member

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!

Copy link
Contributor Author

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
Copy link

codecov bot commented Oct 12, 2020

Codecov Report

Merging #62 into main will increase coverage by 1.93%.
The diff coverage is 100.00%.

Impacted file tree graph

@@             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     
Impacted Files Coverage Δ
spec/memo_wise_spec.rb 100.00% <100.00%> (+2.07%) ⬆️
lib/memo_wise.rb 100.00% <0.00%> (+1.33%) ⬆️

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update f078c09...13a9399. Read the comment docs.

Copy link
Contributor

@ms-ati ms-ati left a comment

Choose a reason for hiding this comment

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

LGTM

@jemmaissroff jemmaissroff merged commit f767545 into main Oct 12, 2020
@jemmaissroff jemmaissroff deleted the fix-missing-code-coverage branch October 12, 2020 20:27
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.

Fix Missing Code Coverage
3 participants