<?xml version="1.0" encoding="UTF-8"?>
<commit>
  <added type="array"/>
  <modified type="array">
    <modified>
      <diff>@@ -1,41 +1,10 @@
-== Creating the test database
+1. Pick Rails version.  Either dump this plugin in a Rails app and run it from there, or specify it as an ENV var:
 
-The default name for the test databases is &quot;activerecord_paranoid&quot;. If you 
-want to use another database name then be sure to update the connection 
-adapter setups you want to test with in test/connections/&lt;your database&gt;/connection.rb. 
-When you have the database online, you can import the fixture tables with 
-the test/fixtures/db_definitions/*.sql files.
+  RAILS=2.2.2 rake
+  RAILS=2.2.2 ruby test/paranoid_test.rb
 
-Make sure that you create database objects with the same user that you specified in i
-connection.rb otherwise (on Postgres, at least) tests for default values will fail.
+2. Setup your database.  By default sqlite3 is used, and no further setup is necessary.  You can pick any of the listed databases in test/database.yml.  Be sure to create the database first.
 
-== Running with Rake
+  DB=mysql rake
 
-The easiest way to run the unit tests is through Rake. The default task runs
-the entire test suite for all the adapters. You can also run the suite on just
-one adapter by using the tasks test_mysql_ruby, test_ruby_mysql, test_sqlite, 
-or test_postresql. For more information, checkout the full array of rake tasks with &quot;rake -T&quot;
-
-Rake can be found at http://rake.rubyforge.org
-
-== Running by hand
-
-Unit tests are located in test directory. If you only want to run a single test suite, 
-or don't want to bother with Rake, you can do so with something like:
-
-   cd test; ruby -I &quot;connections/native_mysql&quot; base_test.rb
-   
-That'll run the base suite using the MySQL-Ruby adapter. Change the adapter
-and test suite name as needed.
-
-== Faster tests
-
-If you are using a database that supports transactions, you can set the
-&quot;AR_TX_FIXTURES&quot; environment variable to &quot;yes&quot; to use transactional fixtures.
-This gives a very large speed boost. With rake:
-
-  rake AR_TX_FIXTURES=yes
-
-Or, by hand:
-
-  AR_TX_FIXTURES=yes ruby -I connections/native_sqlite3 base_test.rb
+3. Profit!!
\ No newline at end of file</diff>
      <filename>RUNNING_UNIT_TESTS</filename>
    </modified>
    <modified>
      <diff>@@ -1,13 +1,27 @@
 $:.unshift(File.dirname(__FILE__) + '/../lib')
 
 require 'test/unit'
-require File.expand_path(File.join(File.dirname(__FILE__), '../../../../config/environment.rb'))
 require 'rubygems'
+if ENV['RAILS'].nil?
+  require File.expand_path(File.join(File.dirname(__FILE__), '../../../../config/environment.rb'))
+else
+  # specific rails version targeted
+  # load activerecord and plugin manually
+  gem 'activerecord', &quot;=#{ENV['RAILS']}&quot;
+  require 'active_record'
+  $LOAD_PATH &lt;&lt; File.join(File.dirname(__FILE__), '..', 'lib')
+  Dir[&quot;#{$LOAD_PATH.last}/**/*.rb&quot;].each do |path| 
+    require path[$LOAD_PATH.last.size + 1..-1]
+  end
+  require File.join(File.dirname(__FILE__), '..', 'init.rb')
+end
 require 'active_record/fixtures'
 
 config = YAML::load(IO.read(File.dirname(__FILE__) + '/database.yml'))
+# do this so fixtures will load
+ActiveRecord::Base.configurations.update config 
 ActiveRecord::Base.logger = Logger.new(File.dirname(__FILE__) + &quot;/debug.log&quot;)
-ActiveRecord::Base.establish_connection(config[ENV['DB'] || 'sqlite'])
+ActiveRecord::Base.establish_connection(config[ENV['DB'] || 'sqlite3'])
 
 load(File.dirname(__FILE__) + &quot;/schema.rb&quot;)
 </diff>
      <filename>test/test_helper.rb</filename>
    </modified>
  </modified>
  <removed type="array"/>
  <parents type="array">
    <parent>
      <id>53aadd9a4bbb7d620bff562cd0246b4794595ed5</id>
    </parent>
  </parents>
  <author>
    <name>rick</name>
    <email>technoweenie@gmail.com</email>
  </author>
  <url>http://github.com/technoweenie/acts_as_paranoid/commit/59f2ef902d016266c1208b89e5dc2cb2b77f2e67</url>
  <id>59f2ef902d016266c1208b89e5dc2cb2b77f2e67</id>
  <committed-date>2009-03-24T09:58:07-07:00</committed-date>
  <authored-date>2009-03-24T09:58:07-07:00</authored-date>
  <message>tweak test_helper to load specific version of activerecord if specified.  fix bug where fixtures are not loaded if ActiveRecord::Base.configurations is blank</message>
  <tree>d71c76afac1b2c20663281e01088d76d0ab23242</tree>
  <committer>
    <name>rick</name>
    <email>technoweenie@gmail.com</email>
  </committer>
</commit>
