mirror of
https://github.com/rails/rails.git
synced 2022-11-09 12:12:34 -05:00
21c9732fae
* Remove spring as a default installation option Faster computers have meant that most apps won't see a big benefit from Spring on small to moderate size apps. Thus the pain of dealing with the occasional spring issue is no longer warranted by default. * Errant end * No longer an option * Additional spring removals * Pointer to docs is enough
32 lines
1 KiB
Ruby
32 lines
1 KiB
Ruby
# frozen_string_literal: true
|
|
|
|
ENV["RAILS_ENV"] = "test"
|
|
ActiveJob::Base.queue_name_prefix = nil
|
|
|
|
require "rails/generators/rails/app/app_generator"
|
|
|
|
require "tmpdir"
|
|
dummy_app_path = Dir.mktmpdir + "/dummy"
|
|
dummy_app_template = File.expand_path("dummy_app_template.rb", __dir__)
|
|
args = Rails::Generators::ARGVScrubber.new(["new", dummy_app_path, "--skip-gemfile", "--skip-bundle",
|
|
"--skip-git", "-d", "sqlite3", "--skip-javascript", "--force", "--quiet",
|
|
"--template", dummy_app_template]).prepare!
|
|
Rails::Generators::AppGenerator.start args
|
|
|
|
require "#{dummy_app_path}/config/environment.rb"
|
|
|
|
ActiveRecord::Migrator.migrations_paths = [ Rails.root.join("db/migrate").to_s ]
|
|
ActiveRecord::Tasks::DatabaseTasks.migrate
|
|
require "rails/test_help"
|
|
|
|
Rails.backtrace_cleaner.remove_silencers!
|
|
|
|
require_relative "test_case_helpers"
|
|
ActiveSupport::TestCase.include(TestCaseHelpers)
|
|
|
|
JobsManager.current_manager.start_workers
|
|
|
|
Minitest.after_run do
|
|
JobsManager.current_manager.stop_workers
|
|
JobsManager.current_manager.clear_jobs
|
|
end
|