#!/usr/bin/env ruby require 'rubygems' gem 'test-unit', '1.2.3' if RUBY_VERSION.to_f >= 1.9 # Why do we need this? $LOAD_PATH.unshift(File.dirname(__FILE__) + '/../lib') unless $LOAD_PATH.include?(File.dirname(__FILE__) + '/../lib') require 'spork' require 'spork/runner' begin success = Spork::Runner.run(ARGV, STDOUT, STDERR) Kernel.exit(success ? 0 : 1) rescue SystemExit => e Kernel.exit(e.status) rescue Exception => e STDERR.puts("#{e.message} (#{e.class})") STDERR.puts(e.backtrace.join("\n")) Kernel.exit 1 end