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

Test against Ruby 3.4 #950

Merged
merged 1 commit into from
Dec 29, 2024
Merged

Test against Ruby 3.4 #950

merged 1 commit into from
Dec 29, 2024

Conversation

tagliala
Copy link
Contributor

@tagliala tagliala commented Dec 29, 2024

Additionally: return implicit nil from SingletonHelpers#collection
to keep the same coverage results as 3.3

Copy link

codecov bot commented Dec 29, 2024

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 98.93%. Comparing base (4b53104) to head (6a45fb3).
Report is 1 commits behind head on master.

Additional details and impacted files
@@           Coverage Diff           @@
##           master     #950   +/-   ##
=======================================
  Coverage   98.92%   98.93%           
=======================================
  Files          14       14           
  Lines         558      563    +5     
=======================================
+ Hits          552      557    +5     
  Misses          6        6           

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

@tagliala
Copy link
Contributor Author

tagliala commented Dec 29, 2024

I'm getting different code coverage between 3.3.6 and 3.4.1

# 3.3.6
Coverage report generated for Unit Tests to ./coverage/coverage.xml. 552 / 558 LOC (98.92%) covered

# 3.4.1
Coverage report generated for Unit Tests to ./coverage/coverage.xml. 559 / 566 LOC (98.76%) covered

3.4.1 detects:

  • 3 more lines detected in lib/inherited_resources/base_helpers.rb (112 vs 109)
  • 2 more lines detected in lib/inherited_resources/singleton_helpers.rb (12 vs 10)

In singleton_helpers, def collection; nil; end does not seem to be covered in 3.4.1, and it looks to be correct, because in 3.3.6

       def collection
-        nil
+        raise
       end

does not raise. So 3.3.6 was reporting wrong coverage

@javierjulio
Copy link
Member

@tagliala thank you. Can you please try removing the nil line so the method just becomes an empty method? It would have the same return value and may appease Codecov here without need for further changes.

Additionally: return implicit `nil` from `SingletonHelpers#collection`
to keep the same coverage results as 3.3
@tagliala tagliala force-pushed the chore/test-against-ruby-34 branch from 70b08d5 to 6a45fb3 Compare December 29, 2024 16:11
@tagliala tagliala requested a review from javierjulio December 29, 2024 16:12
Copy link
Member

@javierjulio javierjulio left a comment

Choose a reason for hiding this comment

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

Thanks!

@tagliala tagliala merged commit bce170c into master Dec 29, 2024
23 checks passed
@tagliala tagliala deleted the chore/test-against-ruby-34 branch December 29, 2024 17:57
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.

2 participants