aboutsummaryrefslogtreecommitdiffstats
path: root/tools/test.rb
blob: 1fd3ee30eb06a4931f8f9a60bf64309928f9a3c0 (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
# frozen_string_literal: true

$: << File.expand_path("test", COMPONENT_ROOT)

require "bundler"
Bundler.setup

require "rails/test_unit/runner"
require "rails/test_unit/reporter"
require "rails/test_unit/line_filtering"
require "active_support"
require "active_support/test_case"

class << Rails
  # Necessary to get rerun-snippets working.
  def root
    @root ||= Pathname.new(COMPONENT_ROOT)
  end
  alias __root root
end

ActiveSupport::TestCase.extend Rails::LineFiltering
Rails::TestUnitReporter.executable = "bin/test"

Rails::TestUnit::Runner.parse_options(ARGV)
Rails::TestUnit::Runner.run(ARGV)