<?xml version="1.0" encoding="UTF-8"?>
<commit>
  <added type="array">
    <added>
      <filename>test/fixtures/candraspouses.yml</filename>
    </added>
    <added>
      <filename>test/fixtures/fosses.rb</filename>
    </added>
    <added>
      <filename>test/fixtures/rhizocables.yml</filename>
    </added>
    <added>
      <filename>test/fixtures/sambocranks.yml</filename>
    </added>
    <added>
      <filename>test/fixtures/schema.rb</filename>
    </added>
  </added>
  <modified type="array">
    <modified>
      <diff>@@ -1,5 +1,8 @@
 require 'rubygems'
 require 'rake'
+
+ENV['RUBY_FLAGS'] = &quot;-I#{%w(lib ext bin test).join(File::PATH_SEPARATOR)}&quot;
+
 begin
   require 'echoe'
 </diff>
      <filename>Rakefile</filename>
    </modified>
    <modified>
      <diff>@@ -104,6 +104,10 @@ module PassiveRecord
         write_inheritable_hash :reflections, name =&gt; reflection
         reflection
       end
+      
+      def reflections
+        read_inheritable_attribute(:reflections) || write_inheritable_attribute(:reflections, {})
+      end
             
       def add_multiple_associated_save_callbacks(association_name)
         method_name = &quot;validate_associated_records_for_#{association_name}&quot;.to_sym
@@ -176,16 +180,15 @@ module PassiveRecord
       
       def collection_reader_method(reflection, association_proxy_class)
         define_method(reflection.name) do |*params|
+          
           force_reload = params.first unless params.empty?
           association = instance_variable_get(&quot;@#{reflection.name}&quot;)
-
           unless association.respond_to?(:loaded?)
             association = association_proxy_class.new(self, reflection)
             instance_variable_set(&quot;@#{reflection.name}&quot;, association)
           end
-
           association.reload if force_reload
-
+          
           association
         end
       end
@@ -267,8 +270,16 @@ module PassiveRecord
         ActiveRecord::Base.send(:compute_type, *args)
       end
       
-      def reflect_on_association(*args)
-        ActiveRecord::Base.send(:reflect_on_association, *args)
+      def reflect_on_association(association)
+        reflections[association].is_a?(ActiveRecord::Reflection::AssociationReflection) ? reflections[association] : nil
+      end
+      
+      def table_name
+        &quot;table_name_foo&quot;
+      end
+      
+      def primary_key
+        &quot;primary_key_bar&quot;
       end
       
     end</diff>
      <filename>lib/passive_record/associations.rb</filename>
    </modified>
    <modified>
      <diff>@@ -3,39 +3,40 @@ require File.dirname(__FILE__) + '/test_helper.rb'
 class PassiveRecord::AssociationsTest &lt; Test::Unit::TestCase
   
   def setup
-    create_fixtures :doors, :furniture
+    create_fixtures :candraspouses, :sambocranks, :rhizocables
   end
   
   def test_should_have_many
-    furniture = [
-      Furniture.find_by_name(&quot;Couch&quot;),
-      Furniture.find_by_name(&quot;Ottoman&quot;)
+    sambocranks = [
+      Sambocrank.find_by_name(&quot;Dakferous&quot;),
+      Sambocrank.find_by_name(&quot;Sambaular&quot;)
     ]
-    room = Room.find_by_name(&quot;Family Room&quot;)
-    assert_equal furniture, room.furniture
+    foss = Foss.find_by_name(&quot;Hypogenoaular&quot;)
+    assert_equal sambocranks, foss.sambocranks
   end
 
   def test_should_have_many_through
-    rooms = [
-      Room.find_by_name(&quot;Office&quot;),
-      Room.find_by_name(&quot;Restroom&quot;)
-    ]
+    foss = Foss.find_by_name(&quot;Zaxment&quot;)
     
-    room = Room.find_by_name(&quot;Family Room&quot;)
+    rhizocables = [
+      Rhizocable.find_by_name(&quot;Ovumgyps&quot;),
+      Rhizocable.find_by_name(&quot;Alfmetric&quot;)
+    ]
     
-    # assert_equal room, room.exits
+    assert_equal rhizocables, foss.rhizocables
   end
 
   def test_should_have_one
-    lamp = Furniture.find_by_name(&quot;Ott-lite&quot;)
-    room = Room.find_by_name(&quot;Office&quot;)
-    assert_equal lamp, room.light_fixture
+    candraspouse = Candraspouse.find_by_name(&quot;Maiamorphic&quot;)
+    foss = Foss.find_by_name(&quot;Zaxment&quot;)
+    
+    assert_equal candraspouse, foss.candraspouse
   end
   
   def test_should_belong_to
-    lamp = Furniture.find_by_name(&quot;Ott-lite&quot;)
-    room = Room.find_by_name(&quot;Office&quot;)
-
-    assert_equal room, lamp.room    
+    candraspouse = Candraspouse.find_by_name(&quot;Eyenium&quot;)
+    foss = Foss.find_by_name(&quot;Hypogenoaular&quot;)
+    
+    assert_equal foss, candraspouse.foss
   end  
 end
\ No newline at end of file</diff>
      <filename>test/test_associations.rb</filename>
    </modified>
    <modified>
      <diff>@@ -13,8 +13,9 @@ Test::Unit::TestCase.fixture_path = File.dirname(__FILE__) + &quot;/fixtures/&quot;
 
 $LOAD_PATH.unshift(Test::Unit::TestCase.fixture_path)
 
+require 'schema'
 require 'continents'
-require 'furniture'
+require 'fosses'
 
 class Test::Unit::TestCase #:nodoc:
 </diff>
      <filename>test/test_helper.rb</filename>
    </modified>
  </modified>
  <removed type="array">
    <removed>
      <filename>test/fixtures/doors.yml</filename>
    </removed>
    <removed>
      <filename>test/fixtures/furniture.rb</filename>
    </removed>
    <removed>
      <filename>test/fixtures/furniture.yml</filename>
    </removed>
  </removed>
  <parents type="array">
    <parent>
      <id>c7fa2c2ca7c91395eff698f7098ac9fb50f40087</id>
    </parent>
  </parents>
  <author>
    <name>Jason L Perry</name>
    <email>jasper@ambethia.com</email>
  </author>
  <url>http://github.com/ambethia/passiverecord/commit/a142de9fcdb12c9c190fe352ca9511cb282d206b</url>
  <id>a142de9fcdb12c9c190fe352ca9511cb282d206b</id>
  <committed-date>2007-10-09T15:03:03-07:00</committed-date>
  <authored-date>2007-10-09T15:03:03-07:00</authored-date>
  <message>Curhugoabled the tests, and ensured has_many :though works</message>
  <tree>2544a1bce05fa60bc691604b9009ab0f36089fa8</tree>
  <committer>
    <name>Jason L Perry</name>
    <email>jasper@ambethia.com</email>
  </committer>
</commit>
