public
Description: Ruby on Rails
Homepage: http://rubyonrails.org
Clone URL: git://github.com/rails/rails.git
Added some has_many tests

Signed-off-by: Pratik Naik <pratiknaik@gmail.com>
DefV (author)
Tue Jun 03 02:06:59 -0700 2008
lifo (committer)
Wed Jun 11 05:18:54 -0700 2008
commit  d0b3685a0e221b54fdf3c27326564950a419d823
tree    1fadcad6671d517747bdd003cd5abb5b4bfadd21
parent  ca9641f8a7ca1142d0ea99405a079c8699bd443c
...
37
38
39
40
 
41
42
43
44
 
45
46
47
48
 
49
50
51
...
37
38
39
 
40
41
42
43
 
44
45
46
47
 
48
49
50
51
0
@@ -37,15 +37,15 @@ class HasManyAssociationsTest < ActiveRecord::TestCase
0
   end
0
 
0
   def test_counting_with_single_conditions
0
-    assert_equal 2, Firm.find(:first).plain_clients.count(:conditions => '1=1')
0
+    assert_equal 1, Firm.find(:first).plain_clients.count(:conditions => 'name="Microsoft"')
0
   end
0
 
0
   def test_counting_with_single_hash
0
-    assert_equal 2, Firm.find(:first).plain_clients.count(:conditions => '1=1')
0
+    assert_equal 1, Firm.find(:first).plain_clients.count(:conditions => {:name => "Microsoft"})
0
   end
0
 
0
   def test_counting_with_column_name_and_hash
0
-    assert_equal 2, Firm.find(:first).plain_clients.count(:all, :conditions => '1=1')
0
+    assert_equal 2, Firm.find(:first).plain_clients.count(:name)
0
   end
0
 
0
   def test_finding

Comments