<?xml version="1.0" encoding="UTF-8"?>
<commit>
  <added type="array"/>
  <modified type="array">
    <modified>
      <diff>@@ -1,86 +1,93 @@
 require File.expand_path(File.join(File.dirname(__FILE__), &quot;test_helper&quot;))
 
 class TestTemporaryTableExtension &lt; TestCaseSuperClass
-  def setup
-    unless Book.supports_temporary_tables?
-      raise &quot;Your database adapter doesn't support temporary tables&quot;
+  def self.test(description, &amp;blk)
+    if Book.supports_temporary_tables?
+      define_method(&quot;test_#{description}&quot;, &amp;blk)
+    else
+      puts &quot;*** no db support for temporary tables, test not running: #{description}&quot;
     end
-    super
   end
 
-  def test_creating_a_temporary_table_creates_a_model
-    model_class = Book.create_temporary_table
-    assert_kind_of Book, model_class.allocate
-  ensure
-    model_class.drop
+  test &quot;creating a temporary model creates a model&quot; do
+    begin
+      model_class = Book.create_temporary_table
+      assert_kind_of Book, model_class.allocate
+    ensure
+      model_class.drop
+    end
   end
-
-  def test_creating_a_temporary_table_creates_a_toplevel_namespace_accessible_model
-    model_class = Book.create_temporary_table
-
-    assert TempBook
-  ensure
-    model_class.drop
+  
+  test &quot;creating_a_temporary_table_creates_a_toplevel_namespace_accessible_model&quot; do
+    begin
+      model_class = Book.create_temporary_table
+      assert TempBook
+    ensure
+      model_class.drop
+    end
   end
-
-  def test_model_can_be_dropped
+  
+  test &quot;model can be dropped&quot; do
     model_class = Book.create_temporary_table
     model_class.drop
-
     assert !Object.const_defined?(model_class.name) 
   end
-
-  def test_creating_a_temporary_table_with_predefined_name
-    model_class = Book.create_temporary_table :table_name =&gt; &quot;xyz&quot;
-    assert_equal &quot;xyz&quot;, model_class.table_name
-  ensure
-    model_class.drop
+  
+  test &quot;creating_a_temporary_table_with_predefined_name&quot; do
+    begin
+      model_class = Book.create_temporary_table :table_name =&gt; &quot;xyz&quot;
+      assert_equal &quot;xyz&quot;, model_class.table_name
+    ensure
+      model_class.drop
+    end
   end
-
-  def test_temp_table_drops_after_block
+  
+  test &quot;temporary table drops after block&quot; do
     temp_model = nil
     Book.create_temporary_table { |t| temp_model = t }
     assert !Object.const_defined?(temp_model.name.to_sym)
   end
-
-  def test_creating_a_temporary_table_with_a_block
+  
+  test &quot;creating a temporary table with a block&quot; do
     Book.create_temporary_table do |model_clazz|
       model_clazz.create(
         :author_name =&gt; &quot;Zach Dennis&quot;,
         :title       =&gt; &quot;SomeBook&quot;,
         :publisher   =&gt; &quot;SomePublisher&quot;
       )
-
       assert_equal 1, model_clazz.count
     end
   end
-
-  def test_creating_a_temporary_table_with_specified_model_name
+  
+  test &quot;creating a temporary table with a specified model name&quot; do
     Book.create_temporary_table(:model_name =&gt; &quot;TestTable&quot;) do |t|
       assert_equal t.name, &quot;TestTable&quot;
     end
   end
-
-  def test_creating_a_temporary_table_with_specified_table_name
+  
+  test &quot;creating a temporary table with specified table name&quot; do
     Book.create_temporary_table(:table_name =&gt; &quot;my_test_books&quot;) do |t|
       assert_equal t.table_name, &quot;my_test_books&quot;
     end
   end
-
-  def test_temporary_table_doesnt_persist_across_connections
-    model_class = Book.create_temporary_table
-    assert_kind_of Book, model_class.allocate
-  ensure
-    model_class.drop
+  
+  test &quot;temporary table doesn't persist across connections&quot; do
+    begin
+      model_class = Book.create_temporary_table
+      assert_kind_of Book, model_class.allocate
+    ensure
+      model_class.drop
+    end
   end
-
-  def test_permanent_table_persists_across_connections
-    model_class = Book.create_temporary_table :permanent =&gt; true
-    model_class.allocate
-    model_class.connection.reconnect!
-
-    assert_equal 0, model_class.count # if we can count, it persisted
-  ensure
-    model_class.drop
+  
+  test &quot;permant table persists across connections&quot; do
+    begin
+      model_class = Book.create_temporary_table :permanent =&gt; true
+      model_class.allocate
+      model_class.connection.reconnect!
+      assert_equal 0, model_class.count # if we can count, it persisted
+    ensure
+      model_class.drop
+    end
   end
 end</diff>
      <filename>ar-extensions/tests/test_temporary_tables.rb</filename>
    </modified>
  </modified>
  <removed type="array"/>
  <parents type="array">
    <parent>
      <id>a78539455c94793aebd3ea25856e3a0cdf79e9ba</id>
    </parent>
  </parents>
  <author>
    <name>Zach Dennis</name>
    <email>zach.dennis@gmail.com</email>
  </author>
  <url>http://github.com/zdennis/ar-extensions/commit/78f4c43f25b209ebe2990f6720545e112c69451c</url>
  <id>78f4c43f25b209ebe2990f6720545e112c69451c</id>
  <committed-date>2009-08-18T18:10:48-07:00</committed-date>
  <authored-date>2009-08-18T18:10:48-07:00</authored-date>
  <message>Update temporary table test to not puke when running sqlite3 tests</message>
  <tree>d4aef41e8ff490b09656353481db082a7f56cad3</tree>
  <committer>
    <name>Zach Dennis</name>
    <email>zach.dennis@gmail.com</email>
  </committer>
</commit>
