summaryrefslogtreecommitdiff
path: root/Rakefile
diff options
context:
space:
mode:
authorAndre Arko <andre@arko.net>2010-03-10 17:10:12 -0800
committerAndre Arko <andre@arko.net>2010-03-12 21:04:29 -0800
commit0898d4e56ae50dbce51b5c7c2d8e507c2e4f070c (patch)
tree32cbbd023e4e0520030a0c0ae9f2c7eff4d88f39 /Rakefile
parent7e15098e9a0da03d1ada7e9a35e31fc0f1f7aa22 (diff)
downloadbundler-0898d4e56ae50dbce51b5c7c2d8e507c2e4f070c.tar.gz
Spec tasks to run on 1.8.6, 1.8.7, and 1.9.2
Diffstat (limited to 'Rakefile')
-rw-r--r--Rakefile33
1 files changed, 29 insertions, 4 deletions
diff --git a/Rakefile b/Rakefile
index ea7e289b39..286d4fb8cc 100644
--- a/Rakefile
+++ b/Rakefile
@@ -36,10 +36,11 @@ else
end
end
-rubyopt = ENV["RUBYOPT"]
+# Rubygems 1.3.5, 1.3.6, and HEAD specs
+rubyopt = ENV["RUBYOPT"]
%w(master REL_1_3_5 REL_1_3_6).each do |rg|
- Spec::Rake::SpecTask.new("spec_#{rg}") do |t|
+ Spec::Rake::SpecTask.new("spec_gems_#{rg}") do |t|
t.spec_files = FileList['spec/**/*_spec.rb']
t.spec_opts = %w(-fs --color)
t.warning = true
@@ -52,9 +53,33 @@ rubyopt = ENV["RUBYOPT"]
ENV["RUBYOPT"] = "-I#{File.expand_path("tmp/rubygems_#{rg}/lib")} #{rubyopt}"
end
- task "spec_#{rg}" => "rubygems_#{rg}"
+ task "spec_gems_#{rg}" => "rubygems_#{rg}"
+ task :ci => "spec_gems_#{rg}"
+end
+
+
+# Ruby 1.8.6, 1.8.7, and 1.9.2 specs
+task "ensure_rvm" do
+ raise "RVM is not available" unless File.exist?(File.expand_path("~/.rvm/scripts/rvm"))
+end
+
+%w(1.8.6-p399 1.8.7-p249 1.9.2-head).each do |ruby|
+ ruby_cmd = File.expand_path("~/.rvm/bin/ruby-#{ruby}")
+
+ Spec::Rake::SpecTask.new("spec_ruby_#{ruby}") do |t|
+ t.spec_files = FileList['spec/**/*_spec.rb']
+ t.spec_opts = %w(-fs --color)
+ t.warning = true
+ t.ruby_cmd = ruby_cmd
+ end
+
+ task "ensure_ruby_#{ruby}" do
+ raise "Could not find Ruby #{ruby} at #{ruby_cmd}" unless File.exist?(ruby_cmd)
+ end
- task :ci => "spec_#{rg}"
+ task "ensure_ruby_#{ruby}" => "ensure_rvm"
+ task "spec_ruby_#{ruby}" => "ensure_ruby_#{ruby}"
+ task :ci => "spec_ruby_#{ruby}"
end
begin