From 449f66a2abd07888f658710b38ebf43f8199f92c Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Marc=20Busqu=C3=A9?= Date: Tue, 24 May 2022 06:49:59 +0200 Subject: [PATCH] Fix warning on Rails 7 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`. --- spec/lib/solidus_subscriptions/subscription_generator_spec.rb | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/spec/lib/solidus_subscriptions/subscription_generator_spec.rb b/spec/lib/solidus_subscriptions/subscription_generator_spec.rb index 13699884..02ed05e2 100644 --- a/spec/lib/solidus_subscriptions/subscription_generator_spec.rb +++ b/spec/lib/solidus_subscriptions/subscription_generator_spec.rb @@ -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