2017-08-13 20:55:53 +08:00
|
|
|
# frozen_string_literal: true
|
|
|
|
|
2015-06-08 20:53:26 +08:00
|
|
|
$: << File.expand_path("test", COMPONENT_ROOT)
|
2016-03-02 12:49:08 +08:00
|
|
|
|
2016-08-07 01:22:51 +08:00
|
|
|
require "bundler"
|
2016-03-02 12:49:08 +08:00
|
|
|
Bundler.setup
|
|
|
|
|
2017-06-26 01:08:26 +08:00
|
|
|
require "rails/test_unit/runner"
|
|
|
|
require "rails/test_unit/reporter"
|
2016-12-17 16:57:43 +08:00
|
|
|
require "rails/test_unit/line_filtering"
|
2017-06-26 01:08:26 +08:00
|
|
|
require "active_support"
|
2016-12-17 16:57:43 +08:00
|
|
|
require "active_support/test_case"
|
2015-06-08 20:53:26 +08:00
|
|
|
|
2017-05-26 13:52:57 +08:00
|
|
|
class << Rails
|
2017-06-21 03:50:05 +08:00
|
|
|
# Necessary to get rerun-snippets working.
|
2017-05-26 13:52:57 +08:00
|
|
|
def root
|
2015-06-08 20:53:26 +08:00
|
|
|
@root ||= Pathname.new(COMPONENT_ROOT)
|
|
|
|
end
|
2017-05-26 13:52:57 +08:00
|
|
|
alias __root root
|
2015-06-08 20:53:26 +08:00
|
|
|
end
|
2015-06-13 17:56:32 +08:00
|
|
|
|
2016-12-17 16:57:43 +08:00
|
|
|
ActiveSupport::TestCase.extend Rails::LineFiltering
|
2015-06-13 17:56:32 +08:00
|
|
|
Rails::TestUnitReporter.executable = "bin/test"
|
2017-06-26 01:08:26 +08:00
|
|
|
|
|
|
|
Rails::TestUnit::Runner.parse_options(ARGV)
|
|
|
|
Rails::TestUnit::Runner.run(ARGV)
|