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



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

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