File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -7,14 +7,15 @@ module SolidusDevSupport
77 class RakeTasks
88 include Rake ::DSL
99
10- def self . install ( *args )
11- new ( *args ) . tap ( &:install )
10+ def self . install ( ** args )
11+ new ( ** args ) . tap ( &:install )
1212 end
1313
14- def initialize ( root : Dir . pwd )
14+ def initialize ( root : Dir . pwd , user_class : "Spree::LegacyUser" )
1515 @root = Pathname ( root )
1616 @test_app_path = @root . join ( ENV . fetch ( 'DUMMY_PATH' , 'spec/dummy' ) )
1717 @gemspec = Bundler . load_gemspec ( @root . glob ( "{,*}.gemspec" ) . first )
18+ @user_class = user_class
1819 end
1920
2021 attr_reader :test_app_path , :root , :gemspec
@@ -39,12 +40,12 @@ def install_test_app_task
3940 # We need to go back to the gem root since the upstream
4041 # extension:test_app changes the working directory to be the dummy app.
4142 task :test_app do
42- Rake ::Task [ 'extension:test_app' ] . invoke
43+ Rake ::Task [ 'extension:test_app' ] . invoke ( @user_class )
4344 cd root
4445 end
4546
4647 directory ENV . fetch ( 'DUMMY_PATH' , nil ) do
47- Rake ::Task [ 'extension:test_app' ] . invoke
48+ Rake ::Task [ 'extension:test_app' ] . invoke ( @user_class )
4849 end
4950 end
5051 end
Original file line number Diff line number Diff line change 22
33require "bundler/gem_tasks"
44require 'solidus_dev_support/rake_tasks'
5- SolidusDevSupport ::RakeTasks . install
5+ SolidusDevSupport ::RakeTasks . install ( user_class : "Spree::User" )
66
77task default : 'extension:specs'
You can’t perform that action at this time.
0 commit comments