<?xml version="1.0" encoding="UTF-8"?>
<commit>
  <added type="array"/>
  <modified type="array">
    <modified>
      <diff>@@ -4,6 +4,7 @@
   * (23 Dec 2008) Clean up old old code and start move towards new gem [Ken Collins]
     * Starting a .gitignore file.
     * Moving to a test/lib based directory structure with a boot and AAV test case based from ActiveRecord's case.
+    * Create rake test and test_dbs tasks.
 
 [0.5.2]
 </diff>
      <filename>CHANGELOG</filename>
    </modified>
    <modified>
      <diff>@@ -1,13 +1,24 @@
 require 'rubygems'
 require 'rake/testtask'
 
-desc 'Default: run unit tests.'
+desc 'Default: Test ActsAsVersioned with default ActiveRecord version.'
 task :default =&gt; :test
 
-desc 'Test the acts_as_versioned plugin.'
+desc 'Test ActsAsVersioned with default ActiveRecord version.'
 Rake::TestTask.new(:test) do |t|
-  t.libs &lt;&lt; 'lib'
+  t.libs &lt;&lt; 'lib' &lt;&lt; 'test'
   t.pattern = 'test/**/*_test.rb'
   t.verbose = true
 end
 
+desc 'Test ActsAsVersioned with all databases.'
+task :test_dbs do
+  test = Rake::Task['test']
+  dbs = ['sqlite3','postgresql','mysql','sqlserver']
+  dbs.each do |db|
+    ENV['DB'] = db
+    test.invoke
+    test.reenable
+  end
+end
+</diff>
      <filename>Rakefile</filename>
    </modified>
    <modified>
      <diff>@@ -25,21 +25,31 @@ require 'active_record/fixtures'
 require 'active_record/test_case'
 
 
-# Establishing the ActiveRecord connection.
+# Establishing the ActiveRecord connection and DB specific tasks.
 
+ardb = ENV['DB'] || 'sqlite3'
 arconfig = YAML::load(IO.read(&quot;#{PROJECT_ROOT}/test/lib/database.yml&quot;))
+
+case ardb
+when 'sqlserver'
+  gem 'rails-sqlserver-2000-2005-adapter'
+  require 'active_record/connection_adapters/sqlserver_adapter'
+end
+
 ActiveRecord::Base.logger = Logger.new(&quot;#{PROJECT_ROOT}/test/debug.log&quot;)
-ActiveRecord::Base.configurations = {'test' =&gt; arconfig[ENV['DB'] || 'sqlite3']}
+ActiveRecord::Base.configurations = {'test' =&gt; arconfig[ardb]}
 ActiveRecord::Base.establish_connection(ActiveRecord::Base.configurations['test'])
+puts &quot;With database: #{ardb}&quot;
 
 
-# Creating the DB schema.
+# Creating the DB schema and DB specific tasks.
 
 ActiveRecord::Migration.verbose = false
 
 load(File.dirname(__FILE__)+&quot;/schema.rb&quot;)
 
-if ENV['DB'] == 'postgresql'
+case ardb
+when 'postgresql'
   ActiveRecord::Base.connection.execute &quot;DROP SEQUENCE widgets_seq;&quot; rescue nil
   ActiveRecord::Base.connection.remove_column :widget_versions, :id
   ActiveRecord::Base.connection.execute &quot;CREATE SEQUENCE widgets_seq START 101;&quot;</diff>
      <filename>test/lib/boot.rb</filename>
    </modified>
    <modified>
      <diff>@@ -30,13 +30,10 @@ class MigrationTest &lt; AAVTestCase
   
   def create_thing
     @thing = Thing.create :title =&gt; 'blah blah', :price =&gt; 123.45, :type =&gt; 'Thing'
-    assert_equal 1, @thing.versions.size
   end
   
   def migrate_down
     ActiveRecord::Migrator.down(MIGRATIONS_ROOT)
-    Thing.reset_column_information
-    assert_raises(ActiveRecord::StatementInvalid) { Thing.create :title =&gt; 'blah blah' }
     ActiveRecord::Base.connection.initialize_schema_migrations_table
     ActiveRecord::Base.connection.assume_migrated_upto_version(0)
   end</diff>
      <filename>test/migration_test.rb</filename>
    </modified>
    <modified>
      <diff>@@ -1,8 +1,9 @@
 class AddVersionedTables &lt; ActiveRecord::Migration
   
   def self.up
+    drop_table :things rescue nil
     drop_table :thing_versions rescue nil
-    create_table :things, :force =&gt; true do |t|
+    create_table :things do |t|
       t.column :title, :text
       t.column :price, :decimal, :precision =&gt; 7, :scale =&gt; 2
       t.column :type, :string
@@ -11,8 +12,8 @@ class AddVersionedTables &lt; ActiveRecord::Migration
   end
   
   def self.down
-    Thing.drop_versioned_table
     drop_table :things rescue nil
+    drop_table :thing_versions rescue nil
   end
   
 end</diff>
      <filename>test/migrations/1_add_versioned_tables.rb</filename>
    </modified>
  </modified>
  <removed type="array"/>
  <parents type="array">
    <parent>
      <id>1a23c33da605f326ee684ef1e22077cae1ed12fd</id>
    </parent>
  </parents>
  <author>
    <name>Ken Collins</name>
    <email>ken@metaskills.net</email>
  </author>
  <url>http://github.com/xmlblog/acts_as_versioned/commit/c62896de63f6339d008522db7dfe449e99239eb9</url>
  <id>c62896de63f6339d008522db7dfe449e99239eb9</id>
  <committed-date>2008-12-29T09:15:53-08:00</committed-date>
  <authored-date>2008-12-29T09:15:53-08:00</authored-date>
  <message>Create rake test and test_dbs tasks.</message>
  <tree>b6a248c542ffe21aa6afdd14f99164caff458fa1</tree>
  <committer>
    <name>Ken Collins</name>
    <email>ken@metaskills.net</email>
  </committer>
</commit>
