aboutsummaryrefslogtreecommitdiffstats
path: root/Library
diff options
context:
space:
mode:
Diffstat (limited to 'Library')
-rw-r--r--Library/Homebrew/cmd/tests.rb5
1 files changed, 5 insertions, 0 deletions
diff --git a/Library/Homebrew/cmd/tests.rb b/Library/Homebrew/cmd/tests.rb
index 27be1cd2f..19576ddd3 100644
--- a/Library/Homebrew/cmd/tests.rb
+++ b/Library/Homebrew/cmd/tests.rb
@@ -27,6 +27,11 @@ module Homebrew
args = []
args << "--trace" if ARGV.include? "--trace"
+ if ARGV.value("only")
+ test_name, test_method = ARGV.value("only").split("/", 2)
+ args << "TEST=test_#{test_name}.rb"
+ args << "TESTOPTS=--name=test_#{test_method}" if test_method
+ end
args += ARGV.named.select { |v| v[/^TEST(OPTS)?=/] }
system "bundle", "exec", "rake", "test", *args