Without getting too deep into my app I''m wondering if anyone has any clues what might give rise to the error posted below. It occurs when I run my unit tests. class Actor < AR:Base belongs_to :court_case end class CaseCause < AR:Base belongs_to :court_case end class CourtCase < AR:Base has_many :actors has_many :case_causes ... end def my_test_method ... kase.actors.clear end def my_other_method ... kase.case_causes.clear end Also, Actor and CaseCause both have observers on them that attempt to update CourtCase. --------------------- Exception: stack level too deep C:/ruby/lib/ruby/gems/1.8/gems/activerecord-1.15.2/lib/active_record/ associations/association_collection.rb:69:in `clear'' (eval):3:in `destroy_without_habtm_shim_for_actors'' (eval):4:in `destroy_without_habtm_shim_for_actors'' (eval):4:in `destroy_without_callbacks'' C:/ruby/lib/ruby/gems/1.8/gems/activerecord-1.15.2/lib/active_record/ callbacks.rb:321:in `destroy_without_transactions'' C:/ruby/lib/ruby/gems/1.8/gems/activerecord-1.15.2/lib/active_record/ transactions.rb:125:in `destroy'' C:/ruby/lib/ruby/gems/1.8/gems/activerecord-1.15.2/lib/active_record/ connection_adapters/abstract/database_statements.rb:59:in `transaction'' C:/ruby/lib/ruby/gems/1.8/gems/activerecord-1.15.2/lib/active_record/ transactions.rb:95:in `transaction'' C:/ruby/lib/ruby/gems/1.8/gems/activerecord-1.15.2/lib/active_record/ transactions.rb:121:in `transaction'' C:/ruby/lib/ruby/gems/1.8/gems/activerecord-1.15.2/lib/active_record/ transactions.rb:125:in `destroy'' C:/ruby/lib/ruby/gems/1.8/gems/activerecord-1.15.2/lib/active_record/ associations/has_many_association.rb:168:in `delete_records'' C:/ruby/lib/ruby/gems/1.8/gems/activerecord-1.15.2/lib/active_record/ associations/has_many_association.rb:168:in `each'' C:/ruby/lib/ruby/gems/1.8/gems/activerecord-1.15.2/lib/active_record/ associations/has_many_association.rb:168:in `delete_records'' C:/ruby/lib/ruby/gems/1.8/gems/activerecord-1.15.2/lib/active_record/ associations/association_collection.rb:59:in `delete'' C:/ruby/lib/ruby/gems/1.8/gems/activerecord-1.15.2/lib/active_record/ connection_adapters/abstract/database_statements.rb:59:in `transaction'' C:/ruby/lib/ruby/gems/1.8/gems/activerecord-1.15.2/lib/active_record/ transactions.rb:95:in `transaction'' C:/ruby/lib/ruby/gems/1.8/gems/activerecord-1.15.2/lib/active_record/ transactions.rb:121:in `transaction'' C:/ruby/lib/ruby/gems/1.8/gems/activerecord-1.15.2/lib/active_record/ associations/association_collection.rb:57:in `delete'' C:/ruby/lib/ruby/gems/1.8/gems/activerecord-1.15.2/lib/active_record/ associations/association_collection.rb:41:in `delete_all'' C:/ruby/lib/ruby/gems/1.8/gems/activerecord-1.15.2/lib/active_record/ associations/association_collection.rb:74:in `clear'' C:\Documents and Settings\andy.PCSSINC.000\My Documents\RailsProjects \rJems/test/unit/court_case_test.rb:162:in `test_removal_of_required_causes_from_active_case'' C:/ruby/lib/ruby/1.8/test/unit/testcase.rb:72:in `__send__'' C:/ruby/lib/ruby/1.8/test/unit/testcase.rb:72:in `run'' C:/ruby/lib/ruby/1.8/test/unit/testsuite.rb:34:in `run'' C:/ruby/lib/ruby/1.8/test/unit/testsuite.rb:33:in `each'' C:/ruby/lib/ruby/1.8/test/unit/testsuite.rb:33:in `run'' C:/ruby/lib/ruby/1.8/test/unit/testsuite.rb:34:in `run'' C:/ruby/lib/ruby/1.8/test/unit/testsuite.rb:33:in `each'' C:/ruby/lib/ruby/1.8/test/unit/testsuite.rb:33:in `run'' C:/ruby/lib/ruby/1.8/test/unit/ui/testrunnermediator.rb:46:in `run_suite'' C:/Program Files/RadRails/plugins/ org.rubypeople.rdt.testunit_0.8.0.604272100PRD/ruby/ RemoteTestRunner.rb:107:in `start_mediator'' C:/Program Files/RadRails/plugins/ org.rubypeople.rdt.testunit_0.8.0.604272100PRD/ruby/ RemoteTestRunner.rb:52:in `start'' C:/Program Files/RadRails/plugins/ org.rubypeople.rdt.testunit_0.8.0.604272100PRD/ruby/ RemoteTestRunner.rb:272 --~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "Ruby on Rails: Talk" group. To post to this group, send email to rubyonrails-talk-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org To unsubscribe from this group, send email to rubyonrails-talk-unsubscribe-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org For more options, visit this group at http://groups.google.com/group/rubyonrails-talk?hl=en -~----------~----~----~----~------~----~------~--~---