aboutsummaryrefslogtreecommitdiffstats
path: root/script/spec
diff options
context:
space:
mode:
authorSeb Bacon <seb.bacon@gmail.com>2011-03-09 14:58:30 +0000
committerSeb Bacon <seb.bacon@gmail.com>2011-03-09 14:58:30 +0000
commitb4585af18e9c3a033f6cfe27213f0575af795a66 (patch)
tree996efa1487ac0d8cb7e4f53ee6478ad625b9d27d /script/spec
parent224b8a4ba3a24af91068505c7907724448a4096d (diff)
parent4cc2cf2a6d935adfd263ea4fd7791a6d84f704da (diff)
merge from master (post-CSRF changes)
Diffstat (limited to 'script/spec')
-rwxr-xr-xscript/spec10
1 files changed, 8 insertions, 2 deletions
diff --git a/script/spec b/script/spec
index 28e8676cc..46fdbe6e4 100755
--- a/script/spec
+++ b/script/spec
@@ -1,4 +1,10 @@
#!/usr/bin/env ruby
-$LOAD_PATH.unshift(File.expand_path(File.dirname(__FILE__) + "/../vendor/plugins/rspec/lib"))
-require 'spec'
+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' if RUBY_VERSION.to_f >= 1.9
+ ENV["RAILS_ENV"] ||= 'test'
+ require File.expand_path(File.dirname(__FILE__) + "/../config/environment") unless defined?(RAILS_ROOT)
+end
+require 'spec/autorun'
exit ::Spec::Runner::CommandLine.run