<?xml version="1.0" encoding="UTF-8"?>
<commit>
  <added type="array">
    <added>
      <filename>script/autospec</filename>
    </added>
  </added>
  <modified type="array">
    <modified>
      <diff>@@ -1,4 +1,10 @@
 #!/usr/bin/env ruby
-$LOAD_PATH.unshift(File.expand_path(File.dirname(__FILE__) + &quot;/../vendor/plugins/rspec/lib&quot;))
-require 'spec'
-exit ::Spec::Runner::CommandLine.run(::Spec::Runner::OptionParser.parse(ARGV, STDERR, STDOUT))
+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 &gt;= 1.9
+  ENV[&quot;RAILS_ENV&quot;] ||= 'test'
+  require File.expand_path(File.dirname(__FILE__) + &quot;/../config/environment&quot;) unless defined?(RAILS_ROOT)
+end
+require 'spec/autorun'
+exit ::Spec::Runner::CommandLine.run</diff>
      <filename>script/spec</filename>
    </modified>
    <modified>
      <diff>@@ -1,99 +1,9 @@
 #!/usr/bin/env ruby
-$LOAD_PATH.unshift File.dirname(__FILE__) + '/../../rspec/lib' # For svn
-$LOAD_PATH.unshift File.dirname(__FILE__) + '/../vendor/plugins/rspec/lib' # For rspec installed as plugin
-require 'rubygems'
-require 'drb/drb'
-require 'rbconfig'
-require 'spec'
-require 'optparse'
-
-# This is based on Florian Weber's TDDMate
-module Spec
-  module Runner
-    class RailsSpecServer
-      def run(argv, stderr, stdout)
-        $stdout = stdout
-        $stderr = stderr
-
-        base = ActiveRecord::Base
-        def base.clear_reloadable_connections!
-          active_connections.each do |name, conn|
-            if conn.requires_reloading?
-              conn.disconnect!
-              active_connections.delete(name)
-            end
-          end
-        end        
+gem 'test-unit', '1.2.3' if RUBY_VERSION.to_f &gt;= 1.9
 
-        if ::Dispatcher.respond_to?(:cleanup_application)
-          ::Dispatcher.cleanup_application
-        elsif ::Dispatcher.respond_to?(:reset_application!)
-          ::Dispatcher.reset_application!
-        end
-        ::Dependencies.mechanism = :load
-        require_dependency('application.rb') unless Object.const_defined?(:ApplicationController)
-        load File.dirname(__FILE__) + '/../spec/spec_helper.rb'
-
-        ::Spec::Runner::CommandLine.run(
-          ::Spec::Runner::OptionParser.parse(
-            argv,
-            $stderr,
-            $stdout
-          )
-        )
-      end
-    end
-  end
-end
 puts &quot;Loading Rails environment&quot;
+ENV[&quot;RAILS_ENV&quot;] ||= 'test'
+require File.expand_path(File.dirname(__FILE__) + &quot;/../config/environment&quot;) unless defined?(RAILS_ROOT)
 
-ENV[&quot;RAILS_ENV&quot;] = &quot;test&quot;
-require File.expand_path(File.dirname(__FILE__) + &quot;/../config/environment&quot;)
-require 'dispatcher'
-
-def restart_test_server
-  puts &quot;restarting&quot;
-  config       = ::Config::CONFIG
-  ruby         = File::join(config['bindir'], config['ruby_install_name']) + config['EXEEXT']
-  command_line = [ruby, $0, ARGV].flatten.join(' ')
-  exec(command_line)
-end
-
-def daemonize(pid_file = nil)
-  return yield if $DEBUG
-  pid = Process.fork{
-    Process.setsid
-    Dir.chdir(RAILS_ROOT)
-    trap(&quot;SIGINT&quot;){ exit! 0 }
-    trap(&quot;SIGTERM&quot;){ exit! 0 }
-    trap(&quot;SIGHUP&quot;){ restart_test_server }
-    File.open(&quot;/dev/null&quot;){|f|
-      STDERR.reopen f
-      STDIN.reopen  f
-      STDOUT.reopen f
-    }
-    yield
-  }
-  puts &quot;spec_server launched. (PID: %d)&quot; % pid
-  File.open(pid_file,&quot;w&quot;){|f| f.puts pid } if pid_file
-  exit! 0
-end
-
-options = Hash.new
-opts = OptionParser.new
-opts.on(&quot;-d&quot;, &quot;--daemon&quot;){|v| options[:daemon] = true }
-opts.on(&quot;-p&quot;, &quot;--pid PIDFILE&quot;){|v| options[:pid] = v }
-opts.parse!(ARGV)
-
-puts &quot;Ready&quot;
-exec_server = lambda {
-  trap(&quot;USR2&quot;) { restart_test_server } if Signal.list.has_key?(&quot;USR2&quot;)
-  DRb.start_service(&quot;druby://localhost:8989&quot;, Spec::Runner::RailsSpecServer.new)
-  DRb.thread.join
-}
-
-if options[:daemon]
-  daemonize(options[:pid], &amp;exec_server)
-else
-  exec_server.call
-end
+require 'optparse'
+require 'spec/rails/spec_server'</diff>
      <filename>script/spec_server</filename>
    </modified>
  </modified>
  <removed type="array"/>
  <parents type="array">
    <parent>
      <id>a0db05c06eeec57168193a54226ee7b83346d967</id>
    </parent>
  </parents>
  <author>
    <name>c3</name>
    <email>courtenay@entp.com</email>
  </author>
  <url>http://github.com/entp/xtt/commit/acf6854c8e99024809b29f798278d46632af9d3e</url>
  <id>acf6854c8e99024809b29f798278d46632af9d3e</id>
  <committed-date>2009-05-15T00:55:04-07:00</committed-date>
  <authored-date>2009-05-15T00:55:04-07:00</authored-date>
  <message>Upgrade scripts for latest spec</message>
  <tree>60a776c73ffea2f23b212955298edd62ea8bca15</tree>
  <committer>
    <name>c3</name>
    <email>courtenay@entp.com</email>
  </committer>
</commit>
