Skip to content
This repository
Browse code

Remove some aggregation tests related to composed_of

Since composed_of was removed in 0517474,
these tests were working "by mistake", due to the matching "address"
string in the error message, but with a different error message than the
expected multiparameter assignment error.

Since "address" is not an attribute from Customer anymore, the error was
"undefined method klass for nil", where nil was supposed to be the
column object.
  • Loading branch information...
commit 45639950966b36c7a02f7d1c80a717e6150480ec 1 parent 100ad21
Carlos Antonio da Silva authored June 28, 2012
20  activerecord/test/cases/base_test.rb
@@ -907,26 +907,6 @@ def test_multiparameter_attributes_setting_time_but_not_date_on_date_field
907 907
     end
908 908
   end
909 909
 
910  
-  def test_multiparameter_assignment_of_aggregation_with_missing_values
911  
-    ex = assert_raise(ActiveRecord::MultiparameterAssignmentErrors) do
912  
-      customer = Customer.new
913  
-      address = Address.new("The Street", "The City", "The Country")
914  
-      attributes = { "address(2)" => address.city, "address(3)" => address.country }
915  
-      customer.attributes = attributes
916  
-    end
917  
-    assert_equal("address", ex.errors[0].attribute)
918  
-  end
919  
-
920  
-  def test_multiparameter_assignment_of_aggregation_with_large_index
921  
-    ex = assert_raise(ActiveRecord::MultiparameterAssignmentErrors) do
922  
-      customer = Customer.new
923  
-      address = Address.new("The Street", "The City", "The Country")
924  
-      attributes = { "address(1)" => "The Street", "address(2)" => address.city, "address(3000)" => address.country }
925  
-      customer.attributes = attributes
926  
-    end
927  
-    assert_equal("address", ex.errors[0].attribute)
928  
-  end
929  
-
930 910
   def test_attributes_on_dummy_time
931 911
     # Oracle, and Sybase do not have a TIME datatype.
932 912
     return true if current_adapter?(:OracleAdapter, :SybaseAdapter)
1  activerecord/test/models/developer.rb
@@ -64,7 +64,6 @@ class AuditLog < ActiveRecord::Base
64 64
   belongs_to :unvalidated_developer, :class_name => 'Developer'
65 65
 end
66 66
 
67  
-DeveloperSalary = Struct.new(:amount)
68 67
 class DeveloperWithBeforeDestroyRaise < ActiveRecord::Base
69 68
   self.table_name = 'developers'
70 69
   has_and_belongs_to_many :projects, :join_table => 'developers_projects', :foreign_key => 'developer_id'

0 notes on commit 4563995

Please sign in to comment.
Something went wrong with that request. Please try again.