aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorJack Nagel2014-06-15 21:14:37 -0500
committerJack Nagel2014-06-18 20:34:10 -0500
commit480e3ec855ae00ebad972a41b21f8a2a5f729c7d (patch)
tree67d45eb88cddf8f16786ddd55b6058039f2d110c
parent66ffc46aba1b45366850d42a50c723dfb732f0ae (diff)
downloadbrew-480e3ec855ae00ebad972a41b21f8a2a5f729c7d.tar.bz2
Make sure compatible gem versions are installed
-rw-r--r--Library/Homebrew/test/Rakefile12
1 files changed, 8 insertions, 4 deletions
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