<?xml version="1.0" encoding="UTF-8"?>
<commit>
  <added type="array">
    <added>
      <filename>.gitignore</filename>
    </added>
  </added>
  <modified type="array">
    <modified>
      <diff>@@ -2,21 +2,36 @@ require 'rake'
 require 'rake/testtask'
 require 'rake/rdoctask'
 
-desc 'Default: run unit tests.'
-task :default =&gt; :test
+begin
+  require 'jeweler'
+  Jeweler::Tasks.new do |s|
+    s.name = &quot;configurator&quot;
+    s.summary = %Q{TODO}
+    s.email = &quot;me@brennandunn.com&quot;
+    s.homepage = &quot;http://github.com/brennandunn/configurator&quot;
+    s.description = &quot;TODO&quot;
+    s.authors = [&quot;Brennan Dunn&quot;]
+  end
+rescue LoadError
+  puts &quot;Jeweler not available. Install it with: sudo gem install technicalpickles-jeweler -s http://gems.github.com&quot;
+end
 
-desc 'Test the configurator plugin.'
+require 'rake/testtask'
 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
+  t.verbose = false
 end
 
-desc 'Generate documentation for the configurator plugin.'
-Rake::RDocTask.new(:rdoc) do |rdoc|
-  rdoc.rdoc_dir = 'rdoc'
-  rdoc.title    = 'Configurator'
-  rdoc.options &lt;&lt; '--line-numbers' &lt;&lt; '--inline-source'
-  rdoc.rdoc_files.include('README')
-  rdoc.rdoc_files.include('lib/**/*.rb')
+begin
+  require 'rcov/rcovtask'
+  Rcov::RcovTask.new do |t|
+    t.libs &lt;&lt; 'test'
+    t.test_files = FileList['test/**/*_test.rb']
+    t.verbose = true
+  end
+rescue LoadError
+  puts &quot;RCov is not available. In order to run rcov, you must: sudo gem install spicycode-rcov&quot;
 end
+
+task :default =&gt; :test</diff>
      <filename>Rakefile</filename>
    </modified>
    <modified>
      <diff>@@ -1,4 +1,3 @@
-require 'test/unit'
 require File.join(File.dirname(__FILE__), 'helper')
  
 class ConfiguratorTest &lt; Test::Unit::TestCase
@@ -8,89 +7,89 @@ class ConfiguratorTest &lt; Test::Unit::TestCase
     @user = User.create
     @company = Company.create
   end
- 
-  def teardown
-    teardown_db
-  end
-  
-  def test_basic
-    @user.config[:favorite_color] = 'red'
-    assert_equal 'red', @user.config[:favorite_color]
-    @user.config['favorite_city'] = 'New York'
-    assert_equal 'New York', @user.config[:favorite_city] # sym/string indifference
-  end
   
-  def test_booleans
-    @user.config[:likes_cats?] = 'true'
-    assert_equal true, @user.config[:likes_cats?]
-    @user.config[:likes_dogs?] = true
-    assert_equal true, @user.config[:likes_dogs?]
-  end
-  
-  def test_namespace
-    @other_user = User.create
+  context 'setting configurator values on objects' do
     
-    @user.config[:animals, :likes_cats?] = true
-    @user.config[:animals, :favorite] = 'cat'
+    should 'not accept either strings or symbols as keys' do
+      @user.config[:favorite_color] = 'red'
+      assert_equal 'red', @user.config[:favorite_color]
+      @user.config['favorite_city'] = 'New York'
+      assert_equal 'New York', @user.config[:favorite_city]
+    end
 
-    @other_user.config[:animals, :likes_cats?] = false
-    @other_user.config[:animals, :favorite] = 'dog'
+    should 'test for TRUE values when supplying an inquiry key' do
+      @user.config[:likes_cats?] = 'true'
+      assert_equal true, @user.config[:likes_cats?]
+      @user.config[:likes_dogs?] = true
+      assert_equal true, @user.config[:likes_dogs?]
+    end
 
-    assert_equal true, @user.config[:animals, :likes_cats?]
-    assert_equal 'cat', @user.config[:animals, :favorite]
-    assert_equal false, @other_user.config[:animals, :likes_cats?]
-    assert_equal 'dog', @other_user.config[:animals, :favorite]
+    should 'handle two levels of namespaces as keys' do
+      @other_user = User.create
+      @user.config[:animals, :likes_cats?] = true
+      @user.config[:animals, :favorite] = 'cat'
+      @other_user.config[:animals, :likes_cats?] = false
+      @other_user.config[:animals, :favorite] = 'dog'
+      assert_equal true, @user.config[:animals, :likes_cats?]
+      assert_equal 'cat', @user.config[:animals, :favorite]
+      assert_equal false, @other_user.config[:animals, :likes_cats?]
+      assert_equal 'dog', @other_user.config[:animals, :favorite]
+      assert_equal true, @user.config.namespace(:animals)[:likes_cats?]
+      assert_equal 'cat', @user.config.namespace(:animals)[:favorite]
+      assert_equal false, @other_user.config.namespace(:animals)[:likes_cats?]
+      assert_equal 'dog', @other_user.config.namespace(:animals)[:favorite]
+    end
 
-    assert_equal true, @user.config.namespace(:animals)[:likes_cats?]
-    assert_equal 'cat', @user.config.namespace(:animals)[:favorite]
-    assert_equal false, @other_user.config.namespace(:animals)[:likes_cats?]
-    assert_equal 'dog', @other_user.config.namespace(:animals)[:favorite]
-  end
-  
-  def test_finding_in_namespace
-    @user.config[:animals, :cat] = 'Toby'
-    @user.config[:animals, :dog] = 'Gabby'
-    @user.config[:animals, :mouse] = 'Mickey'
-    hsh = { :cat =&gt; 'Toby', :dog =&gt; 'Gabby', :mouse =&gt; 'Mickey' }
-    assert_equal hsh, @user.config.namespace(:animals)
-  end
-  
-  def test_default_configuration_settings
-    assert_equal '$55,000', @company.config[:salary, :default_for_manager]
-    @company.config[:salary, :default_for_manager] = '$65,000'
-    assert_equal '$65,000', @company.config[:salary, :default_for_manager]
-  end
- 
-  def test_mass_assignment
-    hash = { :favorite_color =&gt; 'red', :favorite_city =&gt; 'New York', :favorite_artist =&gt; 'Radiohead', :animals =&gt; { :favorite =&gt; 'cat', :likes_elephants? =&gt; true } }
-    @user.config = hash
-    assert_equal @user.config[:favorite_color], 'red'
-    assert_equal @user.config[:animals, :favorite], 'cat'
-    assert_equal @user.config[:animals, :likes_elephants?], true
-  end
-  
-  def test_basic_on_class
-    User.config[:default_salary] = '$55,000'
-    assert_equal User.config[:default_salary], '$55,000'
-  end
-  
-  def test_defaults_on_class
-    assert_equal Company.config[:salary, :default_for_manager], '$55,000'
-  end
-  
-  def test_mass_assignment_on_class
-    hash = { :favorite_color =&gt; 'red', :favorite_city =&gt; 'New York', :favorite_artist =&gt; 'Radiohead', :animals =&gt; { :favorite =&gt; 'cat', :likes_elephants? =&gt; true } }
-    User.config = hash
-    assert_equal User.config[:favorite_color], 'red'
-    assert_equal User.config[:animals, :favorite], 'cat'
-    assert_equal User.config[:animals, :likes_elephants?], true
-  end
-  
-  def test_base_basics
-    Configurator[:enable_quantum_accelerator?] = true
-    assert Configurator[:enable_quantum_accelerator?]
-    Configurator[:colors, :favorite] = 'red'
-    assert_equal Configurator[:colors, :favorite], 'red'
+    should 'return a hash when querying a namespace with #namespace' do
+      @user.config[:animals, :cat] = 'Toby'
+      @user.config[:animals, :dog] = 'Gabby'
+      @user.config[:animals, :mouse] = 'Mickey'
+      hsh = { :cat =&gt; 'Toby', :dog =&gt; 'Gabby', :mouse =&gt; 'Mickey' }
+      assert_equal hsh, @user.config.namespace(:animals)
+    end
+
+    context 'when querying and attempting to write to a key that is a namespace' do
+
+    end
+
+    should 'honor default configuration settings' do
+      assert_equal '$55,000', @company.config[:salary, :default_for_manager]
+      @company.config[:salary, :default_for_manager] = '$65,000'
+      assert_equal '$65,000', @company.config[:salary, :default_for_manager]
+    end
+
+    should 'allow for mass assignment of flat/nested hashes' do
+      hash = { :favorite_color =&gt; 'red', :favorite_city =&gt; 'New York', :favorite_artist =&gt; 'Radiohead', :animals =&gt; { :favorite =&gt; 'cat', :likes_elephants? =&gt; true } }
+      @user.config = hash
+      assert_equal @user.config[:favorite_color], 'red'
+      assert_equal @user.config[:animals, :favorite], 'cat'
+      assert_equal @user.config[:animals, :likes_elephants?], true
+    end
+
+    should 'support default values on a class' do
+      User.config[:default_salary] = '$55,000'
+      assert_equal '$55,000', User.config[:default_salary]
+    end
+
+    should 'support default namespaced values on a class' do
+      assert_equal Company.config[:salary, :default_for_manager], '$55,000'
+    end
+
+    should 'allow for mass assignment on a class' do
+      hash = { :favorite_color =&gt; 'red', :favorite_city =&gt; 'New York', :favorite_artist =&gt; 'Radiohead', :animals =&gt; { :favorite =&gt; 'cat', :likes_elephants? =&gt; true } }
+      User.config = hash
+      assert_equal User.config[:favorite_color], 'red'
+      assert_equal User.config[:animals, :favorite], 'cat'
+      assert_equal User.config[:animals, :likes_elephants?], true
+    end
+
+    should 'support setting global values' do
+      Configurator[:enable_quantum_accelerator?] = true
+      assert Configurator[:enable_quantum_accelerator?]
+      Configurator[:colors, :favorite] = 'red'
+      assert_equal Configurator[:colors, :favorite], 'red'
+    end
+    
   end
  
 end
\ No newline at end of file</diff>
      <filename>test/configurator_test.rb</filename>
    </modified>
    <modified>
      <diff>@@ -4,9 +4,13 @@ rescue LoadError
   require 'rubygems'
   require 'activerecord'
 end
+require 'test/unit'
+require 'shoulda'
+require 'mocha'
 
-require File.join(File.dirname(__FILE__), '..', 'lib', 'configurator')
-require File.join(File.dirname(__FILE__), '..', 'lib', 'configuration_hash')
+$LOAD_PATH.unshift(File.dirname(__FILE__)+'/../lib')
+require 'configurator'
+require 'configuration_hash'
 
 class User &lt; ActiveRecord::Base
   include Configurator
@@ -21,23 +25,23 @@ end
 ActiveRecord::Base.establish_connection(:adapter =&gt; &quot;sqlite3&quot;, :dbfile =&gt; &quot;:memory:&quot;)
  
 def setup_db
-  ActiveRecord::Schema.define(:version =&gt; 1) do
-
-    create_table :config do |t|
-      t.references    :associated, :polymorphic =&gt; true
-      t.string        :namespace
-      t.string        :key,         :limit =&gt; 40,     :null =&gt; false
-      t.string        :value
-    end
+  ::ActiveRecord::Base.class_eval do
+    silence do
+      connection.create_table :config, :force =&gt; true do |t|
+        t.references    :associated, :polymorphic =&gt; true
+        t.string        :namespace
+        t.string        :key,         :limit =&gt; 40,     :null =&gt; false
+        t.string        :value
+      end
     
-    create_table :users do |t|
-      t.string        :handle
-    end
+      connection.create_table :users, :force =&gt; true do |t|
+        t.string        :handle
+      end
     
-    create_table :companies do |t|
-      t.string        :name
+      connection.create_table :companies, :force =&gt; true do |t|
+        t.string        :name
+      end
     end
-
   end
 end
  </diff>
      <filename>test/helper.rb</filename>
    </modified>
  </modified>
  <removed type="array"/>
  <parents type="array">
    <parent>
      <id>5a8aa5ab66e8214c9e719b0366a64be91c58b991</id>
    </parent>
  </parents>
  <author>
    <name>Brennan Dunn</name>
    <email>me@brennandunn.com</email>
  </author>
  <url>http://github.com/brennandunn/configurator/commit/037d02e85a9ca7b66fdd92ecd53eed86828ee4b9</url>
  <id>037d02e85a9ca7b66fdd92ecd53eed86828ee4b9</id>
  <committed-date>2009-02-13T07:11:22-08:00</committed-date>
  <authored-date>2009-02-13T07:11:22-08:00</authored-date>
  <message>Updated Rakefile to ultimately support building as a gem, along with the test suite to use Shoulda. Looking to implement searching soon, as well as general refinement to the library</message>
  <tree>3768d595724b53a01dbd34690928c8c8e8e92063</tree>
  <committer>
    <name>Brennan Dunn</name>
    <email>me@brennandunn.com</email>
  </committer>
</commit>
