Class: DummyApp::RakeTasks

Inherits:
Object
  • Object
show all
Includes:
Rake::DSL
Defined in:
lib/spree/testing_support/dummy_app/rake_tasks.rb

Instance Method Summary collapse

Constructor Details

#initialize(gem_root:, lib_name:) ⇒ RakeTasks

Returns a new instance of RakeTasks.



7
8
9
10
11
12
13
14
15
16
17
18
# File 'lib/spree/testing_support/dummy_app/rake_tasks.rb', line 7

def initialize(gem_root:, lib_name:)
  task :dummy_environment do
    ENV['RAILS_ENV'] = 'test'
    require lib_name
    require 'spree/testing_support/dummy_app'
    DummyApp.setup(
      gem_root: gem_root,
      lib_name: lib_name,
      auto_migrate: false
    )
  end
end