From a14b90dfaa0171b31ebcf3c73793c8980940076f Mon Sep 17 00:00:00 2001 From: wrightling Date: Sat, 22 Oct 2016 11:09:37 -0700 Subject: [PATCH] modify rake task to allow specification of a directory or file to specifially run, instead of the whole library --- README.md | 1 + Rakefile | 3 ++- 2 files changed, 3 insertions(+), 1 deletion(-) diff --git a/README.md b/README.md index 6873372..cc51cfd 100644 --- a/README.md +++ b/README.md @@ -21,6 +21,7 @@ tests with: ``` $ bundle $ bundle exec rake +$ bundle exec rake test # to run a subset of tests ``` Most tests should pass. (If a few tests fail, that's okay. Some of the tests are diff --git a/Rakefile b/Rakefile index be6d2cb..d084fa5 100644 --- a/Rakefile +++ b/Rakefile @@ -3,9 +3,10 @@ require "rake/testtask" Rake::TestTask.new(:test) do |t| t.libs << "smells" t.libs << "support/ruby" + tests = ARGV[1] || "smells/**/*.rb" t.test_files = FileList[ "support/ruby/helper.rb", - "smells/**/*.rb" + tests ] end