<?xml version="1.0" encoding="UTF-8"?>
<commit>
  <added type="array"/>
  <modified type="array">
    <modified>
      <diff>@@ -13,6 +13,7 @@ ActiveRecord::Migration.suppress_messages do
     create_table :posts, :force =&gt; true do |t|
       t.column &quot;author_id&quot;, :integer
       t.column &quot;category_id&quot;, :integer
+      t.column &quot;inflamatory&quot;, :boolean
     end
 
     create_table :categories, :force =&gt; true do |t|
@@ -56,6 +57,17 @@ class Author &lt; User
 end
 
 class Post &lt; ActiveRecord::Base
+  
+  # testing with_scope
+  def self.find_inflamatory(*args)
+    with_scope :find =&gt; {:conditions =&gt; {:inflamatory =&gt; true}} do
+      find(*args)
+    end
+  end
+
+  # only test named_scope in edge
+  named_scope(:inflamatory) if respond_to?(:named_scope)
+  
   belongs_to :author
   belongs_to :category
   has_many :comments</diff>
      <filename>spec/app.rb</filename>
    </modified>
    <modified>
      <diff>@@ -43,28 +43,66 @@ describe 'Commenter use case (a1: p1&gt;c1, a2: p2&gt;c1, p3&gt;c2, a3: p4&gt;c3)' do
       @u1.comments.should == [@comment]
     end
     
-    it &quot;a1.commenters.should == []&quot; do
-      @a1.commenters.should == []
+    it &quot;a1.commenters should be empty&quot; do
+      @a1.commenters.should be_empty
     end
     
-    it &quot;a2.commenters.should == [u1]&quot; do
+    it &quot;a2.commenters should == [u1]&quot; do
       @a2.commenters.should == [@u1]
     end
     
-    it &quot;u1.commented_posts.should == [p2]&quot; do
+    it &quot;u1.commented_posts should == [p2]&quot; do
       @u1.commented_posts.should == [@p2]
     end
     
-    it &quot;u1.commented_authors.should == [a2]&quot; do
+    it &quot;u1.commented_posts.find_inflamatory(:all) should be empty&quot; do
+      @u1.commented_posts.find_inflamatory(:all).should be_empty
+    end
+    
+    if ActiveRecord::Base.respond_to?(:named_scope)
+      it &quot;u1.commented_posts.inflamatory should be empty&quot; do
+        @u1.commented_posts.inflamatory.should be_empty
+      end
+    end
+    
+    it &quot;u1.commented_authors should == [a2]&quot; do
       @u1.commented_authors.should == [@a2]
     end
     
-    it &quot;u1.posts_of_interest.should == [p1, p2, p3]&quot; do
+    it &quot;u1.posts_of_interest should == [p1, p2, p3]&quot; do
       @u1.posts_of_interest.should == [@p1, @p2, @p3]
     end
     
-    it &quot;u1.categories_of_interest.should == [c1, c2]&quot; do
+    it &quot;u1.categories_of_interest should == [c1, c2]&quot; do
       @u1.categories_of_interest.should == [@c1, @c2]
     end
+    
+    describe &quot;when p2 is inflamatory&quot; do
+      before do
+        @p2.toggle!(:inflamatory)
+      end
+      
+      it &quot;p2 should be inflamatory&quot; do
+        @p2.should be_inflamatory
+      end
+      
+      it &quot;u1.commented_posts.find_inflamatory(:all) should == [p2]&quot; do
+        @u1.commented_posts.find_inflamatory(:all).should == [@p2]
+      end
+        
+      it &quot;u1.posts_of_interest.find_inflamatory(:all) should == [p2]&quot; do
+        @u1.posts_of_interest.find_inflamatory(:all).should == [@p2]
+      end
+      
+      if ActiveRecord::Base.respond_to?(:named_scope)
+        it &quot;u1.commented_posts.inflamatory should == [p2]&quot; do
+          @u1.commented_posts.inflamatory.should == [@p2]
+        end
+
+        it &quot;u1.posts_of_interest.inflamatory should == [p2]&quot; do
+          @u1.posts_of_interest.inflamatory.should == [@p2]
+        end
+      end
+    end
   end
 end</diff>
      <filename>spec/models/commenter_spec.rb</filename>
    </modified>
  </modified>
  <removed type="array"/>
  <parents type="array">
    <parent>
      <id>0e20ac5e29064b23b6d9aff88ae34ee77254c8d7</id>
    </parent>
  </parents>
  <author>
    <name>Ian White</name>
    <email>ian.w.white@gmail.com</email>
  </author>
  <url>http://github.com/ianwhite/nested_has_many_through/commit/50d47663286883e23e39d605cc99dfc9d3163747</url>
  <id>50d47663286883e23e39d605cc99dfc9d3163747</id>
  <committed-date>2008-04-30T04:46:17-07:00</committed-date>
  <authored-date>2008-04-30T04:46:17-07:00</authored-date>
  <message>Added with_scope and named_scope specs</message>
  <tree>e52e8f752cfc5b1fc6f547c77daea9834e644921</tree>
  <committer>
    <name>Ian White</name>
    <email>ian.w.white@gmail.com</email>
  </committer>
</commit>
