From ac5ead59ae488e937c6a87662e14fba98b8a1e7e Mon Sep 17 00:00:00 2001 From: Yves Senn Date: Fri, 30 Jan 2015 15:58:55 +0100 Subject: `-p`, `--pattern` to run tests using a pattern. --- railties/lib/rails/test_unit/runner.rb | 4 ++++ 1 file changed, 4 insertions(+) (limited to 'railties/lib') diff --git a/railties/lib/rails/test_unit/runner.rb b/railties/lib/rails/test_unit/runner.rb index 1672e4b09b..5a1b98d534 100644 --- a/railties/lib/rails/test_unit/runner.rb +++ b/railties/lib/rails/test_unit/runner.rb @@ -31,6 +31,10 @@ module Rails "Only run tests matching NAME") do |name| options[:name] = name end + opts.on("-p", "--pattern [PATTERN]", + "Only run tests matching PATTERN") do |pattern| + options[:name] = "/#{pattern}/" + end opts.separator "" opts.separator "Output options:" -- cgit v1.2.3