Hi

I am getting a kind of mysterious error when deleting a group in my  
unit tests. I get this error when calling the "destroy" action in my  
controller, so the only different thing is that it is called from a  
unit test instead of running in Webrick.

I am calling Group.find(params[:id]).destroy in my controller. Group  
has_and_belongs_to_many User and Role objects. The same code does not  
give errors when running as a component but it does when running as  
an Engine. Thus, I suspect something is breaking along the way.

Has anyone else experienced a problem like this?

Regards,

Manuel

====

This is the error:

   1) Error:
test_should_destroy_group_on_destroy_post_with_answer_yes_and_valid_grou 
p_id(ActiveRbac::GroupControllerTest):
SystemStackError: stack level too deep
     /Users/manuel/Development/Rails/arbac.ts.com/rbac_demo/trunk/ 
rbac_demo/vendor/rails/activerecord/lib/active_record/associations.rb: 
752:in `users'
     /Users/manuel/Development/Rails/arbac.ts.com/rbac_demo/trunk/ 
rbac_demo/vendor/rails/activerecord/lib/active_record/associations.rb: 
750:in `users'
     (eval):3:in `destroy_without_habtm_shim_for_roles'
     (eval):4:in `destroy_without_habtm_shim_for_users'

     [these two lines are repeated a lot of times]

     (eval):4:in `destroy_without_callbacks'
     /Users/manuel/Development/Rails/arbac.ts.com/rbac_demo/trunk/ 
rbac_demo/vendor/rails/activerecord/lib/active_record/callbacks.rb: 
321:in `destroy_without_transactions'
     /Users/manuel/Development/Rails/arbac.ts.com/rbac_demo/trunk/ 
rbac_demo/vendor/rails/activerecord/lib/active_record/transactions.rb: 
122:in `destroy'
     /Users/manuel/Development/Rails/arbac.ts.com/rbac_demo/trunk/ 
rbac_demo/vendor/rails/activerecord/lib/active_record/transactions.rb: 
122:in `transaction'
     /Users/manuel/Development/Rails/arbac.ts.com/rbac_demo/trunk/ 
rbac_demo/vendor/rails/activerecord/lib/active_record/transactions.rb: 
91:in `transaction'
     /Users/manuel/Development/Rails/arbac.ts.com/rbac_demo/trunk/ 
rbac_demo/vendor/rails/activerecord/lib/active_record/transactions.rb: 
118:in `transaction'
     /Users/manuel/Development/Rails/arbac.ts.com/rbac_demo/trunk/ 
rbac_demo/vendor/rails/activerecord/lib/active_record/transactions.rb: 
122:in `destroy'
     /Users/manuel/Development/Rails/arbac.ts.com/rbac_demo/trunk/ 
rbac_demo/vendor/plugins/active_rbac/app/controllers/active_rbac/ 
group_controller.rb:131:in `destroy'
     /Users/manuel/Development/Rails/arbac.ts.com/rbac_demo/trunk/ 
rbac_demo/vendor/rails/actionpack/lib/action_controller/base.rb: 
853:in `send'
     /Users/manuel/Development/Rails/arbac.ts.com/rbac_demo/trunk/ 
rbac_demo/vendor/rails/actionpack/lib/action_controller/base.rb: 
853:in `perform_action_without_filters'
     /Users/manuel/Development/Rails/arbac.ts.com/rbac_demo/trunk/ 
rbac_demo/vendor/rails/actionpack/lib/action_controller/filters.rb: 
332:in `perform_action_without_benchmark'
     /Users/manuel/Development/Rails/arbac.ts.com/rbac_demo/trunk/ 
rbac_demo/vendor/rails/actionpack/lib/action_controller/ 
benchmarking.rb:69:in `perform_action_without_rescue'
     /Users/manuel/Development/Rails/arbac.ts.com/rbac_demo/trunk/ 
rbac_demo/vendor/rails/actionpack/lib/action_controller/ 
benchmarking.rb:69:in `measure'
     /Users/manuel/Development/Rails/arbac.ts.com/rbac_demo/trunk/ 
rbac_demo/vendor/rails/actionpack/lib/action_controller/ 
benchmarking.rb:69:in `perform_action_without_rescue'
     /Users/manuel/Development/Rails/arbac.ts.com/rbac_demo/trunk/ 
rbac_demo/vendor/rails/actionpack/lib/action_controller/rescue.rb: 
82:in `perform_action'
     /Users/manuel/Development/Rails/arbac.ts.com/rbac_demo/trunk/ 
rbac_demo/vendor/rails/actionpack/lib/action_controller/base.rb: 
369:in `send'
     /Users/manuel/Development/Rails/arbac.ts.com/rbac_demo/trunk/ 
rbac_demo/vendor/rails/actionpack/lib/action_controller/base.rb: 
369:in `process_without_session_management_support'
     /Users/manuel/Development/Rails/arbac.ts.com/rbac_demo/trunk/ 
rbac_demo/vendor/rails/actionpack/lib/action_controller/ 
session_management.rb:116:in `process_without_test'
     /Users/manuel/Development/Rails/arbac.ts.com/rbac_demo/trunk/ 
rbac_demo/vendor/rails/actionpack/lib/action_controller/ 
test_process.rb:16:in `process'
     /Users/manuel/Development/Rails/arbac.ts.com/rbac_demo/trunk/ 
rbac_demo/vendor/rails/actionpack/lib/action_controller/ 
test_process.rb:300:in `process'
     /Users/manuel/Development/Rails/arbac.ts.com/rbac_demo/trunk/ 
rbac_demo/vendor/rails/actionpack/lib/action_controller/ 
test_process.rb:307:in `post'
     vendor/plugins/active_rbac/test/functional/ 
group_controller_test.rb:245:in  
`test_should_destroy_group_on_destroy_post_with_answer_yes_and_valid_gro 
up_id'
_______________________________________________
engine-developers mailing list
[email protected]
http://lists.rails-engines.org/listinfo.cgi/engine-developers-rails-engines.org

Reply via email to