<?xml version="1.0" encoding="UTF-8"?>
<commit>
  <added type="array">
    <added>
      <filename>lib/tasks/rspec.rake</filename>
    </added>
    <added>
      <filename>script/autospec</filename>
    </added>
  </added>
  <modified type="array">
    <modified>
      <diff>@@ -1,4 +1,5 @@
 #!/usr/bin/env ruby
 $LOAD_PATH.unshift(File.expand_path(File.dirname(__FILE__) + &quot;/../vendor/plugins/rspec/lib&quot;))
+require 'rubygems'
 require 'spec'
 exit ::Spec::Runner::CommandLine.run(::Spec::Runner::OptionParser.parse(ARGV, STDERR, STDOUT))</diff>
      <filename>script/spec</filename>
    </modified>
    <modified>
      <diff>@@ -1,5 +1,4 @@
 #!/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'
@@ -23,20 +22,29 @@ module Spec
               active_connections.delete(name)
             end
           end
-        end        
+        end
 
         if ActionController.const_defined?(:Dispatcher)
           dispatcher = ::ActionController::Dispatcher.new($stdout)
-          dispatcher.cleanup_application(true)
+          dispatcher.cleanup_application
         elsif ::Dispatcher.respond_to?(:reset_application!)
           ::Dispatcher.reset_application!
         else
           raise &quot;Application reloading failed&quot;
         end
+        if Object.const_defined?(:Fixtures) &amp;&amp; Fixtures.respond_to?(:reset_cache)
+          Fixtures.reset_cache
+        end
+
         ::Dependencies.mechanism = :load
         require_dependency('application.rb') unless Object.const_defined?(:ApplicationController)
         load File.dirname(__FILE__) + '/../spec/spec_helper.rb'
 
+        if in_memory_database?
+          load &quot;#{RAILS_ROOT}/db/schema.rb&quot; # use db agnostic schema by default
+          ActiveRecord::Migrator.up('db/migrate') # use migrations
+        end
+
         ::Spec::Runner::CommandLine.run(
           ::Spec::Runner::OptionParser.parse(
             argv,
@@ -45,6 +53,12 @@ module Spec
           )
         )
       end
+
+      def in_memory_database?
+        ENV[&quot;RAILS_ENV&quot;] == &quot;test&quot; and
+        ::ActiveRecord::Base.connection.class.to_s == &quot;ActiveRecord::ConnectionAdapters::SQLite3Adapter&quot; and
+        ::Rails::Configuration.new.database_configuration['test']['database'] == ':memory:'
+      end
     end
   end
 end
@@ -91,7 +105,7 @@ 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.start_service(&quot;druby://127.0.0.1:8989&quot;, Spec::Runner::RailsSpecServer.new)
   DRb.thread.join
 }
 </diff>
      <filename>script/spec_server</filename>
    </modified>
    <modified>
      <diff>@@ -1,6 +1,4 @@
 --colour
---format
-progress
---loadby
-mtime
+--format progress
+--loadby mtime
 --reverse</diff>
      <filename>spec/spec.opts</filename>
    </modified>
    <modified>
      <diff>@@ -28,6 +28,10 @@ Spec::Runner.configure do |config|
   # If you declare global fixtures, be aware that they will be declared
   # for all of your examples, even those that don't use them.
   #
+  # You can also declare which fixtures to use (for example fixtures for test/fixtures):
+  #
+  # config.fixture_path = RAILS_ROOT + '/spec/fixtures/'
+  #
   # == Mock Framework
   #
   # RSpec uses it's own mocking framework by default. If you prefer to
@@ -36,6 +40,10 @@ Spec::Runner.configure do |config|
   # config.mock_with :mocha
   # config.mock_with :flexmock
   # config.mock_with :rr
+  #
+  # == Notes
+  # 
+  # For more information take a look at Spec::Example::Configuration and Spec::Runner
 end
 
 ##</diff>
      <filename>spec/spec_helper.rb</filename>
    </modified>
  </modified>
  <removed type="array"/>
  <parents type="array">
    <parent>
      <id>e5f92f63339a94f2259db7dda8026468d3196c2f</id>
    </parent>
  </parents>
  <author>
    <name>Tim Riley</name>
    <email>tim@openmonkey.com</email>
  </author>
  <url>http://github.com/timriley/flickr-portfolio/commit/757fccc3c0ac87c256c44da57348c96903624109</url>
  <id>757fccc3c0ac87c256c44da57348c96903624109</id>
  <committed-date>2008-12-15T03:12:03-08:00</committed-date>
  <authored-date>2008-12-15T03:12:03-08:00</authored-date>
  <message>upgrade to newer version of rpsec</message>
  <tree>91544faad4869e6db97dc015b1d9f88f7cc38e74</tree>
  <committer>
    <name>Tim Riley</name>
    <email>tim@openmonkey.com</email>
  </committer>
</commit>
