<?xml version="1.0" encoding="UTF-8"?>
<commit>
  <added type="array"/>
  <modified type="array">
    <modified>
      <diff>@@ -3,20 +3,16 @@ module RailsJitsu
   module HasManyTenses #:nodoc:
 
     def self.included(base)
-      base.cattr_accessor :recency
-      base.cattr_accessor :compare_to
       base.extend ClassMethods
     end
 
     module ClassMethods
       
-      def has_many_tenses(options = {})
-        self.recency = 15.minutes.ago
-        self.compare_to = :created_at
-        if options.is_a?(Hash)
-          self.recency = options[:recency] if options[:recency].class == Time
-          self.compare_to = options[:compare_to] if options[:compare_to]
-        end
+      def has_many_tenses(opts = {})
+        write_inheritable_attribute :recency, opts[:recency] || 15.minutes.ago
+        write_inheritable_attribute :compare_to, opts[:compare_to] || :created_at
+        class_inheritable_reader    :recency
+        class_inheritable_reader    :compare_to
         include RailsJitsu::HasManyTenses::InstanceMethods
       end
     end</diff>
      <filename>lib/has_many_tenses.rb</filename>
    </modified>
    <modified>
      <diff>@@ -26,6 +26,7 @@ class HasManyTensesTest &lt; Test::Unit::TestCase
   end
   
   def test_future_has_many_association_proxy
+    c = Comment.new
     post = create_posts_and_comments_with_date({:created_at =&gt; 15.seconds.from_now})
     assert_equal 5, post.comments.future.size
     assert_equal 0, post.comments.past.size</diff>
      <filename>test/has_many_tenses_test.rb</filename>
    </modified>
    <modified>
      <diff>@@ -1,6 +1,6 @@
 require(File.join(File.dirname(__FILE__), 'test_helper'))
 
-class Comment &lt; ActiveRecord::Base
+class SecondComment &lt; ActiveRecord::Base
   belongs_to :post
   has_many_tenses :compare_to =&gt; :date
 end
@@ -8,42 +8,42 @@ end
 class HasManyTensesWithCompareToTest &lt; Test::Unit::TestCase
   
   def test_future_instance
-    assert Comment.new({:date =&gt; 15.seconds.from_now}).future?
-    assert !Comment.new({:date =&gt; 15.seconds.from_now}).past?
-    assert !Comment.new({:date =&gt; 15.seconds.from_now}).recent?
+    assert SecondComment.new({:date =&gt; 15.seconds.from_now}).future?
+    assert !SecondComment.new({:date =&gt; 15.seconds.from_now}).past?
+    assert !SecondComment.new({:date =&gt; 15.seconds.from_now}).recent?
   end
   
   def test_past_instance
-    assert Comment.new({:date =&gt; 15.seconds.ago}).past?
-    assert !Comment.new({:date =&gt; 15.seconds.ago}).future?
-    assert Comment.new({:date =&gt; 15.seconds.ago}).recent?
+    assert SecondComment.new({:date =&gt; 15.seconds.ago}).past?
+    assert !SecondComment.new({:date =&gt; 15.seconds.ago}).future?
+    assert SecondComment.new({:date =&gt; 15.seconds.ago}).recent?
   end
   
   def test_recent_instance
-    assert Comment.new({:date =&gt; 15.seconds.ago}).recent?
-    assert !Comment.new({:date =&gt; 15.seconds.ago}).future?
-    assert Comment.new({:date =&gt; 15.seconds.ago}).past?
+    assert SecondComment.new({:date =&gt; 15.seconds.ago}).recent?
+    assert !SecondComment.new({:date =&gt; 15.seconds.ago}).future?
+    assert SecondComment.new({:date =&gt; 15.seconds.ago}).past?
   end
   
   def test_future_has_many_association_proxy
-    post = create_posts_and_comments_with_date({:date =&gt; 15.seconds.from_now})
-    assert_equal 5, post.comments.future.size
-    assert_equal 0, post.comments.past.size
-    assert_equal 0, post.comments.recent.size
+    post = create_posts_and_second_comments_with_date({:date =&gt; 15.seconds.from_now})
+    assert_equal 5, post.second_comments.future.size
+    assert_equal 0, post.second_comments.past.size
+    assert_equal 0, post.second_comments.recent.size
   end
 
   def test_past_has_many_association_proxy
-    post = create_posts_and_comments_with_date({:date =&gt; 15.seconds.ago})
-    assert_equal 0, post.comments.future.size
-    assert_equal 5, post.comments.past.size
-    assert_equal 5, post.comments.recent.size
+    post = create_posts_and_second_comments_with_date({:date =&gt; 15.seconds.ago})
+    assert_equal 0, post.second_comments.future.size
+    assert_equal 5, post.second_comments.past.size
+    assert_equal 5, post.second_comments.recent.size
   end
 
   def test_past_and_no_recent_has_many_association_proxy
-    post = create_posts_and_comments_with_date({:date =&gt; 15.days.ago})
-    assert_equal 0, post.comments.future.size
-    assert_equal 5, post.comments.past.size
-    assert_equal 0, post.comments.recent.size
+    post = create_posts_and_second_comments_with_date({:date =&gt; 15.days.ago})
+    assert_equal 0, post.second_comments.future.size
+    assert_equal 5, post.second_comments.past.size
+    assert_equal 0, post.second_comments.recent.size
   end
   
 end</diff>
      <filename>test/has_many_tenses_with_compare_to_test.rb</filename>
    </modified>
    <modified>
      <diff>@@ -1,6 +1,6 @@
 require(File.join(File.dirname(__FILE__), 'test_helper'))
 
-class Comment &lt; ActiveRecord::Base
+class ThirdComment &lt; ActiveRecord::Base
   belongs_to :post
   has_many_tenses :recency =&gt; 15.days.ago
 end
@@ -8,23 +8,23 @@ end
 class HasManyTensesWithRecencyTest &lt; Test::Unit::TestCase
   
   def test_recent_instance
-    assert Comment.new({:created_at =&gt; 15.days.ago}).recent?
-    assert !Comment.new({:created_at =&gt; 15.days.ago}).future?
-    assert Comment.new({:created_at =&gt; 15.days.ago}).past?
+    assert ThirdComment.new({:created_at =&gt; 15.days.ago}).recent?
+    assert !ThirdComment.new({:created_at =&gt; 15.days.ago}).future?
+    assert ThirdComment.new({:created_at =&gt; 15.days.ago}).past?
   end
   
   def test_recent_has_many_association_proxy
-    post = create_posts_and_comments_with_date({:created_at =&gt; 15.days.ago})
-    assert_equal 0, post.comments.future.size
-    assert_equal 5, post.comments.past.size
-    assert_equal 5, post.comments.recent.size
+    post = create_posts_and_third_comments_with_date({:created_at =&gt; 15.days.ago})
+    assert_equal 0, post.third_comments.future.size
+    assert_equal 5, post.third_comments.past.size
+    assert_equal 5, post.third_comments.recent.size
   end
 
   def test_past_and_no_recent_has_many_association_proxy
-    post = create_posts_and_comments_with_date({:created_at =&gt; 16.days.ago})
-    assert_equal 0, post.comments.future.size
-    assert_equal 5, post.comments.past.size
-    assert_equal 0, post.comments.recent.size
+    post = create_posts_and_third_comments_with_date({:created_at =&gt; 16.days.ago})
+    assert_equal 0, post.third_comments.future.size
+    assert_equal 5, post.third_comments.past.size
+    assert_equal 0, post.third_comments.recent.size
   end
  
 end
\ No newline at end of file</diff>
      <filename>test/has_many_tenses_with_recency_test.rb</filename>
    </modified>
    <modified>
      <diff>@@ -13,4 +13,18 @@ ActiveRecord::Schema.define(:version =&gt; 0) do
     t.time              :date
   end
   
+  create_table :second_comments, :force =&gt; true do |t|
+    t.references        :post
+    t.timestamps
+    t.text              :body
+    t.time              :date
+  end
+  
+  create_table :third_comments, :force =&gt; true do |t|
+    t.references        :post
+    t.timestamps
+    t.text              :body
+    t.time              :date
+  end
+  
 end
\ No newline at end of file</diff>
      <filename>test/schema.rb</filename>
    </modified>
    <modified>
      <diff>@@ -1,4 +1,5 @@
 require 'test/unit'
+require 'rubygems'
 require 'active_record'
 require 'has_many_tenses'
 
@@ -12,6 +13,22 @@ load(File.join(File.dirname(__FILE__), 'schema.rb'))
 
 class Post &lt; ActiveRecord::Base
   has_many :comments, :extend =&gt; RailsJitsu::HasManyTenses::SingletonMethods
+  has_many :second_comments, :extend =&gt; RailsJitsu::HasManyTenses::SingletonMethods
+  has_many :third_comments, :extend =&gt; RailsJitsu::HasManyTenses::SingletonMethods
+end
+
+def create_posts_and_second_comments_with_date(date)
+  post = Post.new({:body =&gt; &quot;post&quot;})
+  post.save
+  5.times{|i| post.second_comments &lt;&lt; SecondComment.new(date.merge!({:body =&gt; i}))}
+  post
+end
+
+def create_posts_and_third_comments_with_date(date)
+  post = Post.new({:body =&gt; &quot;post&quot;})
+  post.save
+  5.times{|i| post.third_comments &lt;&lt; ThirdComment.new(date.merge!({:body =&gt; i}))}
+  post
 end
 
 def create_posts_and_comments_with_date(date)</diff>
      <filename>test/test_helper.rb</filename>
    </modified>
  </modified>
  <removed type="array"/>
  <parents type="array">
    <parent>
      <id>94e96e005d58183b07cbdbf2659ed8443605b759</id>
    </parent>
  </parents>
  <author>
    <name>Jake Dempsey</name>
    <email>angelo0000@gmail.com</email>
  </author>
  <url>http://github.com/angelo0000/has_many_tenses/commit/44bce26cc042e1ec56b27590c48ed822dad04f89</url>
  <id>44bce26cc042e1ec56b27590c48ed822dad04f89</id>
  <committed-date>2008-03-07T16:35:46-08:00</committed-date>
  <authored-date>2008-03-07T16:35:46-08:00</authored-date>
  <message>fixed the tests had to modify plugin to not use cattr</message>
  <tree>855596eada760bd5a762402131115b123bb431c7</tree>
  <committer>
    <name>Jake Dempsey</name>
    <email>angelo0000@gmail.com</email>
  </committer>
</commit>
