Skip to content

Commit

Permalink
Test app task: Allow passing in user class
Browse files Browse the repository at this point in the history
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`.
  • Loading branch information
mamhoff authored and tvdeyen committed Dec 2, 2024
1 parent b388c0a commit 520efc0
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions core/lib/spree/testing_support/extension_rake.rb
Original file line number Diff line number Diff line change
Expand Up @@ -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|

Check warning on line 7 in core/lib/spree/testing_support/extension_rake.rb

View check run for this annotation

Codecov / codecov/patch

core/lib/spree/testing_support/extension_rake.rb#L7

Added line #L7 was not covered by tests
Spree::DummyGeneratorHelper.inject_extension_requirements = true
Rake::Task['common:test_app'].invoke
Rake::Task['common:test_app'].invoke(args[:user_class])

Check warning on line 9 in core/lib/spree/testing_support/extension_rake.rb

View check run for this annotation

Codecov / codecov/patch

core/lib/spree/testing_support/extension_rake.rb#L9

Added line #L9 was not covered by tests
end
end

0 comments on commit 520efc0

Please sign in to comment.