public
Description: rails plugin that allows has_many :through to go through other has_many :throughs
Homepage:
Clone URL: git://github.com/ianwhite/nested_has_many_through.git
Fixed spec that failed in 2.0-stable and 2.0.2 due to eager loading changes
ianwhite (author)
Wed Apr 30 05:09:37 -0700 2008
commit  d4fbcf20b538f240062c4b7a6953de4c85e44545
tree    409cc8529d6b1c15fd55361267ea53372f90f59d
parent  c6353e4f8ca1be367f56036eb34fbac83292e6fd
...
87
88
89
90
 
 
91
92
93
94
 
 
95
96
97
...
87
88
89
 
90
91
92
93
 
 
94
95
96
97
98
0
@@ -87,11 +87,12 @@ describe 'Commenter use case (a1: p1>c1, a2: p2>c1, p3>c2, a3: p4>c3)' do
0
       end
0
       
0
       it "u1.commented_posts.find_inflamatory(:all) should == [p2]" do
0
-        @u1.commented_posts.find_inflamatory(:all).should == [@p2]
0
+        # uniq ids is here (and next spec) because eager loading changed behaviour 2.0.2 => edge
0
+        @u1.commented_posts.find_inflamatory(:all).collect(&:id).uniq.should == [@p2.id]
0
       end
0
         
0
-      it "u1.posts_of_interest.find_inflamatory(:all) should == [p2]" do
0
-        @u1.posts_of_interest.find_inflamatory(:all).should == [@p2]
0
+      it "u1.posts_of_interest.find_inflamatory(:all).uniq should == [p2]" do
0
+        @u1.posts_of_interest.find_inflamatory(:all).collect(&:id).uniq.should == [@p2.id]
0
       end
0
       
0
       if ActiveRecord::Base.respond_to?(:named_scope)

Comments