diff options
author | Arthur Neves <arthurnn@gmail.com> | 2015-01-23 16:19:58 -0500 |
---|---|---|
committer | Yves Senn <yves.senn@gmail.com> | 2015-03-18 09:52:16 +0100 |
commit | 5d934caabbf339dccba2837d686ce9ac73a1eeb0 (patch) | |
tree | 9afc4fc86b7e660f3e4e6374bc97fc37e86220a8 /railties/lib/rails/test_unit | |
parent | ff0a7611cf912ce7ae32966cc42da5dbdff3a0bc (diff) | |
download | rails-5d934caabbf339dccba2837d686ce9ac73a1eeb0.tar.gz rails-5d934caabbf339dccba2837d686ce9ac73a1eeb0.tar.bz2 rails-5d934caabbf339dccba2837d686ce9ac73a1eeb0.zip |
If a nem given, use that name to filter the test
Diffstat (limited to 'railties/lib/rails/test_unit')
-rw-r--r-- | railties/lib/rails/test_unit/runner.rb | 6 |
1 files changed, 1 insertions, 5 deletions
diff --git a/railties/lib/rails/test_unit/runner.rb b/railties/lib/rails/test_unit/runner.rb index 6f9fdab68a..da3d553e53 100644 --- a/railties/lib/rails/test_unit/runner.rb +++ b/railties/lib/rails/test_unit/runner.rb @@ -49,12 +49,12 @@ module Rails def run enable_backtrace if @options[:backtrace] - filter_tests_by_name if @options[:name] run_tests end def find_method + return @options[:name] if @options[:name] return if @line.blank? method = test_methods.find do |test_method, start_line, end_line| (start_line..end_line).include?(@line.to_i) @@ -89,10 +89,6 @@ module Rails ENV["BACKTRACE"] = "1" end - def filter_tests_by_name - ARGV.push("-n", @options[:name]) - end - def test_methods methods_map = [] suites = Minitest::Runnable.runnables.shuffle |