diff options
Diffstat (limited to 'test/test_helper.rb')
-rw-r--r-- | test/test_helper.rb | 22 |
1 files changed, 10 insertions, 12 deletions
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 @@ | |||
1 | require File.expand_path("../../test/dummy/config/environment.rb", __FILE__) | 1 | ENV["RAILS_ENV"] ||= "test" |
2 | ActiveRecord::Migrator.migrations_paths = [File.expand_path("../../test/dummy/db/migrate", __FILE__)] | 2 | require_relative "../config/environment" |
3 | ActiveRecord::Migrator.migrations_paths << File.expand_path('../../db/migrate', __FILE__) | ||
4 | require "rails/test_help" | 3 | require "rails/test_help" |
5 | 4 | ||
6 | # Filter out Minitest backtrace while allowing backtrace from other libraries | 5 | module ActiveSupport |
7 | # to be shown. | 6 | class TestCase |
8 | Minitest.backtrace_filter = Minitest::BacktraceFilter.new | 7 | # Run tests in parallel with specified workers |
8 | parallelize(workers: :number_of_processors) | ||
9 | 9 | ||
10 | # Setup all fixtures in test/fixtures/*.yml for all tests in alphabetical order. | ||
11 | fixtures :all | ||
10 | 12 | ||
11 | # Load fixtures from the engine | 13 | # Add more helper methods to be used by all tests here... |
12 | if ActiveSupport::TestCase.respond_to?(:fixture_path=) | 14 | end |
13 | ActiveSupport::TestCase.fixture_path = File.expand_path("../fixtures", __FILE__) | ||
14 | ActionDispatch::IntegrationTest.fixture_path = ActiveSupport::TestCase.fixture_path | ||
15 | ActiveSupport::TestCase.file_fixture_path = ActiveSupport::TestCase.fixture_path + "/files" | ||
16 | ActiveSupport::TestCase.fixtures :all | ||
17 | end | 15 | end |