Module: DummyApp

Defined in:
lib/spree/testing_support/dummy_app.rb,
lib/spree/testing_support/dummy_app/migrations.rb,
lib/spree/testing_support/dummy_app/rake_tasks.rb

Defined Under Namespace

Modules: Migrations Classes: Application, RakeTasks

Class Method Summary collapse

Class Method Details

.setup(gem_root:, lib_name:, auto_migrate: true) ⇒ Object



35
36
37
38
39
40
41
42
43
44
# File 'lib/spree/testing_support/dummy_app.rb', line 35

def self.setup(gem_root:, lib_name:, auto_migrate: true)
  ENV["LIB_NAME"] = lib_name
  DummyApp::Application.config.root = File.join(gem_root, 'spec', 'dummy')

  DummyApp::Application.initialize! unless DummyApp::Application.initialized?

  if auto_migrate
    DummyApp::Migrations.auto_migrate
  end
end