From 26523ebd7ebed971774a6b0e43e72107aaf974c0 Mon Sep 17 00:00:00 2001 From: Martin Meyerhoff Date: Sun, 1 Dec 2024 12:56:42 +0100 Subject: [PATCH] Test app task: Allow passing in user class Without this, every extension's test app always has `Spree::LegacyUser` configured. Mostly, that's fine, but for solidus_auth_devise, it'd be nicer if the generated spree.rb file would have `Spree.user_class = "Spree::User"` rather than `Spree::LegacyUser`. (cherry picked from commit 520efc0631bdf34c46f205aa63e632fabe7246db) --- core/lib/spree/testing_support/extension_rake.rb | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/core/lib/spree/testing_support/extension_rake.rb b/core/lib/spree/testing_support/extension_rake.rb index f03d87ce527..4597fa4465a 100644 --- a/core/lib/spree/testing_support/extension_rake.rb +++ b/core/lib/spree/testing_support/extension_rake.rb @@ -4,8 +4,8 @@ desc "Generates a dummy app for testing an extension" namespace :extension do - task :test_app, [:user_class] do |_t, _args| + task :test_app, [:user_class] do |_t, args| Spree::DummyGeneratorHelper.inject_extension_requirements = true - Rake::Task['common:test_app'].invoke + Rake::Task['common:test_app'].invoke(args[:user_class]) end end