Skip to content
Snippets Groups Projects
Commit 17667c03 authored by Mike McQuaid's avatar Mike McQuaid
Browse files

Add deps target to tests Rakefile for needed gems.

parent f4cf04b9
No related branches found
No related tags found
No related merge requests found
......@@ -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
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment