From e687ede9cd390b09bf1e87c6de18924ec57ff3c3 Mon Sep 17 00:00:00 2001 From: Eric Wong Date: Thu, 3 Jun 2010 23:01:20 +0000 Subject: tests: add preliminary Rails 3 tests We'll be switching to Isolate and shell-based tests since the old test/unit-based Rails test was basically a shell script written in Ruby. --- Rakefile | 21 +++++++++++++++++++++ 1 file changed, 21 insertions(+) (limited to 'Rakefile') diff --git a/Rakefile b/Rakefile index 598852e..469ed3d 100644 --- a/Rakefile +++ b/Rakefile @@ -189,3 +189,24 @@ begin end rescue LoadError end + +task :isolate do + require 'isolate' + opts = { + :system => false, + :path => "tmp/isolate/ruby-#{RUBY_VERSION}", + :multiruby => false, # we want "1.8.7" instead of "1.8" + } + + # C extensions aren't binary-compatible across Ruby versions + fork { Isolate.now!(opts) { gem 'sqlite3-ruby', '1.2.5' } } + + # pure Ruby gems can be shared across all Rubies + %w(3.0.0.beta3).each do |rails_ver| + opts[:path] = "tmp/isolate/rails-#{rails_ver}" + fork { Isolate.now!(opts) { gem 'rails', rails_ver } } + end + + failed = Process.waitall.delete_if { |(_,status)| status.success? } + abort failed.inspect unless failed.empty? +end -- cgit v1.2.3-24-ge0c7