public
Fork of rails/rails
Description: Ruby on Rails
Homepage: http://rubyonrails.org
Clone URL: git://github.com/ezmobius/rails.git
Fix faulty tests introduced in 8d0b4fa39
NZKoz (author)
Fri May 23 23:34:59 -0700 2008
commit  6277fd91133a3566333612857510d74de60d67f4
tree    50293bf7a9a2ced9d1bf275b6ff5bca160d98fec
parent  6cba97d2a449faf21aec9fe9d4434067e414226f
...
26
27
28
29
 
30
31
32
...
26
27
28
 
29
30
31
32
0
@@ -26,7 +26,7 @@ class HasOneAssociationsTest < ActiveRecord::TestCase
0
 
0
   def test_with_select
0
     assert_equal Firm.find(1).account_with_select.attributes.size, 2
0
- assert_equal Firm.find(1, :include => :account_with_select).attributes.size, 2
0
+ assert_equal Firm.find(1, :include => :account_with_select).account_with_select.attributes.size, 2
0
   end
0
 
0
   def test_can_marshal_has_one_association_with_nil_target
...
159
160
161
162
 
 
163
164
 
165
166
167
...
159
160
161
 
162
163
164
 
165
166
167
168
0
@@ -159,9 +159,10 @@ class ReflectionTest < ActiveRecord::TestCase
0
   end
0
 
0
   def test_reflection_of_all_associations
0
- assert_equal 19, Firm.reflect_on_all_associations.size
0
+ # FIXME these assertions bust a lot
0
+ assert_equal 20, Firm.reflect_on_all_associations.size
0
     assert_equal 16, Firm.reflect_on_all_associations(:has_many).size
0
- assert_equal 3, Firm.reflect_on_all_associations(:has_one).size
0
+ assert_equal 4, Firm.reflect_on_all_associations(:has_one).size
0
     assert_equal 0, Firm.reflect_on_all_associations(:belongs_to).size
0
   end
0
 
...
47
48
49
50
 
51
52
53
...
47
48
49
 
50
51
52
53
0
@@ -47,7 +47,7 @@ class Firm < Company
0
   has_many :readonly_clients, :class_name => 'Client', :readonly => true
0
 
0
   has_one :account, :foreign_key => "firm_id", :dependent => :destroy
0
- has_one :account_with_select, :foreign_key => "firm_id", :select => "id, firm_id"
0
+ has_one :account_with_select, :foreign_key => "firm_id", :select => "id, firm_id", :class_name=>'Account'
0
   has_one :readonly_account, :foreign_key => "firm_id", :class_name => "Account", :readonly => true
0
 end
0
 

Comments

    No one has commented yet.