diff options
| author | Mike McQuaid | 2013-04-26 22:23:45 +0100 |
|---|---|---|
| committer | Mike McQuaid | 2013-04-26 22:32:26 +0100 |
| commit | 94a944aa3fc15db0866bebb919189a933dc2715f (patch) | |
| tree | 41cff84ecf62af4b3d7deed3bce2ff32ef25c619 | |
| parent | 705b5e133d8334cae66710fac1c14ed8f8713d6b (diff) | |
| download | homebrew-94a944aa3fc15db0866bebb919189a933dc2715f.tar.bz2 | |
Add deps target to tests Rakefile for needed gems.
| -rw-r--r-- | Library/Homebrew/test/Rakefile | 9 |
1 files changed, 9 insertions, 0 deletions
diff --git a/Library/Homebrew/test/Rakefile b/Library/Homebrew/test/Rakefile index 1a9b26f92..cfb3d7d97 100644 --- a/Library/Homebrew/test/Rakefile +++ b/Library/Homebrew/test/Rakefile @@ -4,11 +4,20 @@ require 'pathname' TEST_DIRECTORY = Pathname.new(File.expand_path(__FILE__)).parent.realpath TEST_FILES = FileList["#{TEST_DIRECTORY}/test_*.rb"] +GEM_DEPS = ['mocha'] Dir.chdir(TEST_DIRECTORY) task :default => :test +task :deps do + GEM_DEPS.each do |dep| + `gem list --installed #{dep}` + next if $?.success? + sh 'gem', 'install', '--no-ri', '--no-rdoc', '--user-install', dep + end +end + Rake::TestTask.new(:test) do |t| t.libs << Dir.pwd t.test_files = TEST_FILES |
