aboutsummaryrefslogtreecommitdiffstats
path: root/railties/lib
diff options
context:
space:
mode:
authorYves Senn <yves.senn@gmail.com>2015-01-30 15:58:55 +0100
committerYves Senn <yves.senn@gmail.com>2015-03-18 09:52:19 +0100
commitac5ead59ae488e937c6a87662e14fba98b8a1e7e (patch)
tree6e75be44c668e1197389f016e7b0e271d7c5caab /railties/lib
parentf78708c180868d54e9b86e5d406b69e3de50f503 (diff)
downloadrails-ac5ead59ae488e937c6a87662e14fba98b8a1e7e.tar.gz
rails-ac5ead59ae488e937c6a87662e14fba98b8a1e7e.tar.bz2
rails-ac5ead59ae488e937c6a87662e14fba98b8a1e7e.zip
`-p`, `--pattern` to run tests using a pattern.
Diffstat (limited to 'railties/lib')
-rw-r--r--railties/lib/rails/test_unit/runner.rb4
1 files changed, 4 insertions, 0 deletions
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:"