From 56f5841d4b9c12296cdfcaeff174b2627d59afc8 Mon Sep 17 00:00:00 2001 From: Star Rauchenberger Date: Sat, 7 Dec 2024 11:49:49 -0500 Subject: Migrate to full rails app --- test/test_helper.rb | 22 ++++++++++------------ 1 file changed, 10 insertions(+), 12 deletions(-) (limited to 'test/test_helper.rb') diff --git a/test/test_helper.rb b/test/test_helper.rb index cfcfffe..0c22470 100644 --- a/test/test_helper.rb +++ b/test/test_helper.rb @@ -1,17 +1,15 @@ -require File.expand_path("../../test/dummy/config/environment.rb", __FILE__) -ActiveRecord::Migrator.migrations_paths = [File.expand_path("../../test/dummy/db/migrate", __FILE__)] -ActiveRecord::Migrator.migrations_paths << File.expand_path('../../db/migrate', __FILE__) +ENV["RAILS_ENV"] ||= "test" +require_relative "../config/environment" require "rails/test_help" -# Filter out Minitest backtrace while allowing backtrace from other libraries -# to be shown. -Minitest.backtrace_filter = Minitest::BacktraceFilter.new +module ActiveSupport + class TestCase + # Run tests in parallel with specified workers + parallelize(workers: :number_of_processors) + # Setup all fixtures in test/fixtures/*.yml for all tests in alphabetical order. + fixtures :all -# Load fixtures from the engine -if ActiveSupport::TestCase.respond_to?(:fixture_path=) - ActiveSupport::TestCase.fixture_path = File.expand_path("../fixtures", __FILE__) - ActionDispatch::IntegrationTest.fixture_path = ActiveSupport::TestCase.fixture_path - ActiveSupport::TestCase.file_fixture_path = ActiveSupport::TestCase.fixture_path + "/files" - ActiveSupport::TestCase.fixtures :all + # Add more helper methods to be used by all tests here... + end end -- cgit 1.4.1