<?xml version="1.0" encoding="UTF-8"?>
<commit>
  <added type="array">
    <added>
      <filename>test/template_database.yml.example</filename>
    </added>
    <added>
      <filename>test/template_migration.rb</filename>
    </added>
  </added>
  <modified type="array">
    <modified>
      <diff>@@ -2,3 +2,4 @@ tmp
 pkg
 *.swp
 doc
+test/template_database.yml</diff>
      <filename>.gitignore</filename>
    </modified>
    <modified>
      <diff>@@ -11,20 +11,6 @@ class TestGigantronGenerator &lt; Test::Unit::TestCase
     bare_teardown
   end
   
-  # Some generator-related assertions:
-  #   assert_generated_file(name, &amp;block) # block passed the file contents
-  #   assert_directory_exists(name)
-  #   assert_generated_class(name, &amp;block)
-  #   assert_generated_module(name, &amp;block)
-  #   assert_generated_test_for(name, &amp;block)
-  # The assert_generated_(class|module|test_for) &amp;block is passed the body of the class/module within the file
-  #   assert_has_method(body, *methods) # check that the body has a list of methods (methods with parentheses not supported yet)
-  #
-  # Other helper methods are:
-  #   app_root_files - put this in teardown to show files generated by the test method (e.g. p app_root_files)
-  #   bare_setup - place this in setup method to create the APP_ROOT folder for each test
-  #   bare_teardown - place this in teardown method to destroy the TMP_ROOT or APP_ROOT folder after each test
-  
   def test_generator_without_options
     run_generator('gigantron', [APP_ROOT], sources)
     assert_directory_exists &quot;tasks/&quot;
@@ -44,21 +30,20 @@ class TestGigantronGenerator &lt; Test::Unit::TestCase
     assert_generated_file   &quot;initialize.rb&quot;
   end
 
-#=begin
   context &quot;Generated project&quot; do
     setup do
       run_generator('gigantron', [APP_ROOT], sources)
 
-      GTRON_ENV = :test
+      silence_warnings { GTRON_ENV = :test }
       require File.join(APP_ROOT, &quot;initialize.rb&quot;)
       require 'gigantron/migrator'
-
+      if !File.exists? &quot;test/template_database.yml&quot;
+        puts &quot;Configure test DB in 'test/template_database.yml'!&quot;
+      end
+      assert File.exists?(&quot;test/template_database.yml&quot;)
       File.open(&quot;#{APP_ROOT}/database.yml&quot;, &quot;w&quot;) do |f|
-        f.puts %Q{
-:test:
-  :adapter: jdbcsqlite3
-  :url: jdbc:sqlite:#{GTRON_ROOT}/db/test.sqlite3
-        }
+        f.write ERB.new(
+          File.read(&quot;test/template_database.yml&quot;)).result(binding)
       end
 
       get_db_conn(GTRON_ENV)
@@ -71,32 +56,17 @@ class TestGigantronGenerator &lt; Test::Unit::TestCase
           run_generator('migration', ['CreateFoos'], sources)
         end
 
-        assert File.exists? &quot;#{APP_ROOT}/db/migrate/001_create_foos.rb&quot;
-        File.open(&quot;#{APP_ROOT}/db/migrate/001_create_foos.rb&quot;, &quot;w&quot;) do |f|
-          f.puts %q{
-class CreateFoos &lt; ActiveRecord::Migration
-  def self.up
-    create_table :foos do |t|
-      t.string :title
-    end
-
-    %w(Foo Bar).each do |t|
-      Foo.new(:title =&gt; t).save
-    end
-  end
+        assert File.exists?(&quot;#{APP_ROOT}/db/migrate/001_create_foos.rb&quot;)
+        FileUtils.cp(&quot;test/template_migration.rb&quot;, 
+          &quot;#{APP_ROOT}/db/migrate/001_create_foos.rb&quot;)
 
-  def self.down
-    drop_table :foos
-  end
-end
-          }
-        end
         get_db_conn(GTRON_ENV)
+        ENV[&quot;VERBOSE&quot;] = &quot;false&quot;
         Gigantron.migrate_dbs
       end
 
       should &quot;create test db&quot; do
-        assert File.exists? &quot;#{APP_ROOT}/db/test.sqlite3&quot;
+        assert File.exists?(&quot;#{APP_ROOT}/db/test.sqlite3&quot;)
       end
 
       should &quot;create table foos and populate&quot; do
@@ -104,7 +74,6 @@ end
       end
     end
   end
-#=end
   
   private
   def sources</diff>
      <filename>test/test_gigantron_generator.rb</filename>
    </modified>
  </modified>
  <removed type="array"/>
  <parents type="array">
    <parent>
      <id>ef5751e6e22e2e9b25c7bc7637e2415d6882355b</id>
    </parent>
  </parents>
  <author>
    <name>Ben Hughes</name>
    <email>ben@pixelmachine.org</email>
  </author>
  <url>http://github.com/schleyfox/gigantron/commit/4e5fa9483e7678ae62d514dc7dd7b702fc718e83</url>
  <id>4e5fa9483e7678ae62d514dc7dd7b702fc718e83</id>
  <committed-date>2008-06-15T11:48:48-07:00</committed-date>
  <authored-date>2008-06-15T11:48:48-07:00</authored-date>
  <message>Changed tests to work on MRI and JRuby

* moved test files into templates</message>
  <tree>4e56734b9e75025abd58dd84e25ccc96178208cd</tree>
  <committer>
    <name>Ben Hughes</name>
    <email>ben@pixelmachine.org</email>
  </committer>
</commit>
