diff options
author | Yves Senn <yves.senn@gmail.com> | 2015-01-29 11:34:10 +0100 |
---|---|---|
committer | Yves Senn <yves.senn@gmail.com> | 2015-03-18 09:52:18 +0100 |
commit | f4ea8dda1b150d8abc2f41a214e15ae81ed5f9b5 (patch) | |
tree | 8028984db0b99b48bc110d619eaaea39f5c37fe1 /railties | |
parent | 613bdd9d4c6b024cbc26186f1ad443faa6cdffb1 (diff) | |
download | rails-f4ea8dda1b150d8abc2f41a214e15ae81ed5f9b5.tar.gz rails-f4ea8dda1b150d8abc2f41a214e15ae81ed5f9b5.tar.bz2 rails-f4ea8dda1b150d8abc2f41a214e15ae81ed5f9b5.zip |
move argument parsing into the `Runner`.
Diffstat (limited to 'railties')
-rw-r--r-- | railties/lib/rails/commands/test.rb | 4 | ||||
-rw-r--r-- | railties/lib/rails/test_unit/runner.rb | 5 |
2 files changed, 6 insertions, 3 deletions
diff --git a/railties/lib/rails/commands/test.rb b/railties/lib/rails/commands/test.rb index 1efd010dc7..ada21e7d3f 100644 --- a/railties/lib/rails/commands/test.rb +++ b/railties/lib/rails/commands/test.rb @@ -1,7 +1,5 @@ ENV["RAILS_ENV"] = "test" require "rails/test_unit/runner" -options = Rails::TestRunner::Options.parse(ARGV) $: << File.expand_path("../../test", APP_PATH) - -Rails::TestRunner.new(options).run +Rails::TestRunner.run(ARGV) diff --git a/railties/lib/rails/test_unit/runner.rb b/railties/lib/rails/test_unit/runner.rb index 67c86e0dd0..c5bf97bfc9 100644 --- a/railties/lib/rails/test_unit/runner.rb +++ b/railties/lib/rails/test_unit/runner.rb @@ -63,6 +63,11 @@ module Rails @options = options end + def self.run(arguments) + options = Rails::TestRunner::Options.parse(arguments) + Rails::TestRunner.new(options).run + end + def run $rails_test_runner = self run_tests |