Skip to content

Commit

Permalink
Fix warning on Rails 7
Browse files Browse the repository at this point in the history
Rails 7 deprecates ActiveSupport's `Enum#sum` in favor of Ruby's one,
which requires an initial argument when the elements are not numeric.
Here, it's easier to just use `Enum#flatten`.
  • Loading branch information
waiting-for-dev committed May 24, 2022
1 parent e12258d commit 449f66a
Showing 1 changed file with 1 addition and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -75,7 +75,7 @@
weekly_subscriptions,
expiring_subscriptions,
]
grouping_result = described_class.group(subscriptions.sum)
grouping_result = described_class.group(subscriptions.flatten)

expect(grouping_result).to match_array(subscriptions)
end
Expand Down

0 comments on commit 449f66a

Please sign in to comment.