1
0
Fork 0
mirror of https://github.com/rails/rails.git synced 2022-11-09 12:12:34 -05:00
rails--rails/tools/test.rb
Yves Senn 2e59604909 make it possible to customize the executable inside rereun snippets.
In the Rails repository we use a `bin/test` executable to run our tests.
However the rerun snippets still included `bin/rails test`:

BEFORE:
```
Failed tests:

bin/rails test test/cases/adapters/postgresql/schema_test.rb:91
```

AFTER:
```
Failed tests:

bin/test test/cases/adapters/postgresql/schema_test.rb:91
```
2015-06-13 11:58:43 +02:00

12 lines
320 B
Ruby

$: << File.expand_path("test", COMPONENT_ROOT)
require File.expand_path("../../load_paths", __FILE__)
require "rails/test_unit/minitest_plugin"
module Rails
# Necessary to get rerun-snippts working.
def self.root
@root ||= Pathname.new(COMPONENT_ROOT)
end
end
Rails::TestUnitReporter.executable = "bin/test"