diff --git a/Library/Homebrew/test/Rakefile b/Library/Homebrew/test/Rakefile index ea61abef8a..1f919aab28 100644 --- a/Library/Homebrew/test/Rakefile +++ b/Library/Homebrew/test/Rakefile @@ -3,15 +3,19 @@ require 'rake/testtask' TEST_DIRECTORY = File.dirname(File.expand_path(__FILE__)) TEST_FILES = Dir["#{TEST_DIRECTORY}/test_*.rb"] -GEM_DEPS = %w[mocha minitest] +GEM_DEPS = { + "mocha" => "~> 1.1", + "minitest" => "~> 5.3", + "rake" => "~> 10.3", +} task :default => :test task :deps do - GEM_DEPS.each do |dep| - `gem list --installed #{dep}` + GEM_DEPS.each do |dep, version| + `gem list --installed #{dep} -v '#{version}'` next if $?.success? - sh 'gem', 'install', '--no-ri', '--no-rdoc', '--user-install', dep + sh "gem", "install", "--no-ri", "--no-rdoc", "--user-install", dep, "-v", version end end