<?xml version="1.0" encoding="UTF-8"?>
<commit>
  <added type="array"/>
  <modified type="array">
    <modified>
      <diff>@@ -59,9 +59,7 @@ between 10,000 and 200,000.
 
 == Development
 
-If you want to run the specs, first run the script/setup command. After 
-that you'll need to create the PostgreSQL and MySQL databases to match 
-the spec/database.yml settings.
+See spec/README for instructions on running specs.
 
 This project can be found on github at the following URL.
 </diff>
      <filename>README</filename>
    </modified>
    <modified>
      <diff>@@ -1,16 +1,23 @@
-Running Populator Specs
------------------------
+Running Specs
+-------------
 
-There are several rake tasks for running the specs.
+To prepare the specs, run this command.
+
+  script/setup
+  
+This will generate the spec/database.yml file. Configure this to work 
+with your databases. You can add and remove entries here as well to 
+test different databases. A rake task is available to run the specs for 
+each database.
 
   rake spec             # Run specs under all databases
   rake spec:mysql       # Run specs under mysql
   rake spec:sqlite3     # Run specs under sqlite3
+  rake spec:postgresql  # Run specs under postgresql
   ...
 
-To run the specs under mysql you have to create the database and user.
-See spec/database.yml for specifics.
+Don't forget to create the user and database as necessary. You can do 
+so under MySQL with these commands.
 
   CREATE DATABASE populator_test;
   GRANT ALL ON populator_test.* TO populator@localhost;
-</diff>
      <filename>spec/README</filename>
    </modified>
    <modified>
      <diff>@@ -1,3 +1,5 @@
+# you can add and remove entries to support different databases in tests.
+
 sqlite3:
   adapter: sqlite3
   database: spec/test.sqlite3</diff>
      <filename>spec/example_database.yml</filename>
    </modified>
    <modified>
      <diff>@@ -4,11 +4,12 @@ require 'active_support'
 require 'active_record'
 require File.dirname(__FILE__) + '/../lib/populator.rb'
 
-ENV['POPULATOR_ADAPTER'] ||= 'sqlite3'
+adapter = ENV['POPULATOR_ADAPTER'] || 'sqlite3'
+puts &quot;Running specs on #{ENV['POPULATOR_ADAPTER']}&quot;
 
 # setup database adapter
 ActiveRecord::Base.establish_connection(
-  YAML.load(File.read(File.dirname(__FILE__) + &quot;/database.yml&quot;))[ENV['POPULATOR_ADAPTER']]
+  YAML.load(File.read(File.dirname(__FILE__) + &quot;/database.yml&quot;))[adapter]
 )
 
 # keep track of which queries have been executed</diff>
      <filename>spec/spec_helper.rb</filename>
    </modified>
    <modified>
      <diff>@@ -1,6 +1,6 @@
 require 'spec/rake/spectask'
 
-ADAPTERS = %w[sqlite3 mysql postgresql]
+ADAPTERS = YAML.load(File.read(File.dirname(__FILE__) + &quot;/../spec/database.yml&quot;)).keys
 
 desc &quot;Run specs under all supported databases&quot;
 task :spec =&gt; ADAPTERS.map { |a| &quot;spec:#{a}&quot; }</diff>
      <filename>tasks/spec.rake</filename>
    </modified>
  </modified>
  <removed type="array"/>
  <parents type="array">
    <parent>
      <id>957777d2c67ab9d9efdad6cf914ffd0dfa497fac</id>
    </parent>
  </parents>
  <author>
    <name>Ryan Bates</name>
    <email>ryan@railscasts.com</email>
  </author>
  <url>http://github.com/ryanb/populator/commit/155d72b229985608c08cdfb7b1180c215dc0edd7</url>
  <id>155d72b229985608c08cdfb7b1180c215dc0edd7</id>
  <committed-date>2008-08-29T09:30:19-07:00</committed-date>
  <authored-date>2008-08-29T09:30:19-07:00</authored-date>
  <message>now possible to add/remove entries from database.yml to define which databases to run the specs on</message>
  <tree>16005e50e9ba002fdd33f5e7726e4caa5ffcc0a7</tree>
  <committer>
    <name>Ryan Bates</name>
    <email>ryan@railscasts.com</email>
  </committer>
</commit>
