aboutsummaryrefslogtreecommitdiffstats
path: root/Library/Homebrew/test/Rakefile
blob: cf3000b9b9150ceb820cda839677ff769b5b916c (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
require 'rake'
require 'rake/testtask'

Dir.chdir File.expand_path(File.dirname(__FILE__))

TEST_FILES = FileList['test_*.rb']

task :default => :test

Rake::TestTask.new :test do |t|
  t.libs << Dir.pwd
  t.test_files = TEST_FILES
end

namespace :test do
  TEST_FILES.each do |file|
    task = /test_(.+)\.rb/.match(file)
    Rake::TestTask.new(task[1]) do |t|
      t.libs << Dir.pwd
      t.pattern = task[0]
    end
  end
end