From 480e3ec855ae00ebad972a41b21f8a2a5f729c7d Mon Sep 17 00:00:00 2001 From: Jack Nagel Date: Sun, 15 Jun 2014 21:14:37 -0500 Subject: Make sure compatible gem versions are installed --- Library/Homebrew/test/Rakefile | 12 ++++++++---- 1 file changed, 8 insertions(+), 4 deletions(-) (limited to 'Library') diff --git a/Library/Homebrew/test/Rakefile b/Library/Homebrew/test/Rakefile index ea61abef8..1f919aab2 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 -- cgit v1.2.3