public
Description: PLEASE CHECK http://github.com/lifo/docrails/wikis
Homepage: http://weblog.rubyonrails.org/2008/5/2/help-improve-rails-documentation-on-git-branch
Clone URL: git://github.com/lifo/docrails.git
Search Repo:
Fixing test for named_scope through a has_many :through

The test that checks if a has_many :through association has access to 
named_scope had a typo and
didn't have the proper fixtures loaded. [#190 state:resolved]
divoxx (author)
Tue May 13 18:08:31 -0700 2008
technoweenie (committer)
Thu May 15 17:56:23 -0700 2008
commit  5a3fd46d42f05a241b3178af60d38fe5e0cebee6
tree    0844133721ecd7e58471406459d855702c43ff6b
parent  fc02eabf296d6edb74a95174c7322293a54c9492
...
6
7
8
9
 
10
11
12
...
95
96
97
98
 
99
100
101
...
6
7
8
 
9
10
11
12
...
95
96
97
 
98
99
100
101
0
@@ -6,7 +6,7 @@ require 'models/reply'
0
 require 'models/author'
0
 
0
 class NamedScopeTest < ActiveRecord::TestCase
0
- fixtures :posts, :authors, :topics
0
+ fixtures :posts, :authors, :topics, :comments
0
 
0
   def test_implements_enumerable
0
     assert !Topic.find(:all).empty?
0
@@ -95,7 +95,7 @@ class NamedScopeTest < ActiveRecord::TestCase
0
   end
0
 
0
   def test_has_many_through_associations_have_access_to_named_scopes
0
- assert_not_equal Comment.containing_the_letter_e, authors(:david).posts
0
+ assert_not_equal Comment.containing_the_letter_e, authors(:david).comments
0
     assert !Comment.containing_the_letter_e.empty?
0
 
0
     assert_equal authors(:david).comments & Comment.containing_the_letter_e, authors(:david).comments.containing_the_letter_e

Comments

    No one has commented yet.