23 lines
601 B
Ruby
Executable File
23 lines
601 B
Ruby
Executable File
#!/usr/bin/env ruby
|
|
if ARGV.any? { |arg| %w[--drb -X --generate-options -G --help -h --version -v].include?(arg) }
|
|
require 'rubygems' unless ENV['NO_RUBYGEMS']
|
|
else
|
|
gem 'test-unit', '1.2.3'
|
|
ENV["RAILS_ENV"] ||= 'test'
|
|
require File.expand_path(File.dirname(__FILE__) + "/../config/environment") unless defined?(Rails)
|
|
end
|
|
|
|
if CANVAS_RAILS2
|
|
require 'spec/autorun'
|
|
exit ::Spec::Runner::CommandLine.run
|
|
else
|
|
require 'rspec/autorun'
|
|
#make sure ARGV which is a filelist gets flattened and passed
|
|
#correctly this solution just runs the first file
|
|
exit ::RSpec::Core::Runner.run(ARGV)
|
|
end
|
|
|
|
|
|
|
|
|