aboutsummaryrefslogtreecommitdiffstats
path: root/Rakefile
diff options
context:
space:
mode:
authorAndre Arko <andre@arko.net>2010-10-19 11:22:06 -0700
committerAndre Arko <andre@arko.net>2010-10-19 11:22:06 -0700
commitadbe01d5696cf529b20cb9a48e9a73df0dbd400d (patch)
tree9397982ab5f35a664bc25a94627f33a7dfa82e39 /Rakefile
parent4c3b33917e2cfb1568b1650d1bc45b585f6061ec (diff)
downloadbundler-adbe01d5696cf529b20cb9a48e9a73df0dbd400d.tar.gz
rake spec:deps to install ronn and rspec 2.0
Diffstat (limited to 'Rakefile')
-rw-r--r--Rakefile16
1 files changed, 9 insertions, 7 deletions
diff --git a/Rakefile b/Rakefile
index 48dda169..6e9f4f6f 100644
--- a/Rakefile
+++ b/Rakefile
@@ -43,12 +43,6 @@ begin
desc "Run the spec suite with the sudo tests"
task :sudo => ["set_sudo", "clean", "spec"]
- desc "Install dependencies to run the specs"
- task :deps do
- sh "gem install ronn --no-ri --no-rdoc"
- sh "gem install rspec --pre --no-ri --no-rdoc"
- end
-
namespace :rubygems do
# Rubygems 1.3.5, 1.3.6, and HEAD specs
rubyopt = ENV["RUBYOPT"]
@@ -100,7 +94,15 @@ begin
rescue LoadError
task :spec do
- abort "Run `gem install rspec --pre` to be able to run specs"
+ abort "Run `rake spec:deps` to be able to run specs"
+ end
+end
+
+namespace :spec do
+ desc "Ensure spec dependencies are installed"
+ task :deps do
+ sh "gem list ronn | (grep 'ronn' 1> /dev/null) || gem install ronn --no-ri --no-rdoc"
+ sh "gem list rspec | (grep 'rspec (2.0' 1> /dev/null) || gem install rspec --pre --no-ri --no-rdoc"
end
end