I am having this crazy problem where it ONLY shows up in testing.
This is my test code <code> def test_should_destroy task1 = Task.new(:description => "tmp", :done => false, :user => User.find_by_login('admin')) assert task1.save assert task1.destroy end </code>
This is my task model <code> class Task < ActiveRecord::Base acts_as_taggable acts_as_nested_set
belongs_to :user validates_presence_of :user end </code>
The result of running the test: 1) Error: test_should_destroy(TaskTest): SystemStackError: stack level too deep /Users/alan/Projects/superb/vendor/plugins/acts_as_taggable_on_steroids/lib/acts_as_taggable.rb:220:in `reload_without_tag_list' /Users/alan/Projects/superb/vendor/plugins/acts_as_taggable_on_steroids/lib/acts_as_taggable.rb:220:in `reload' /Users/alan/Projects/superb/vendor/plugins/betternestedset/lib/better_nested_set.rb:161:in `before_destroy' /Library/Ruby/Gems/1.8/gems/activerecord-2.0.2/lib/active_record/callbacks.rb:322:in `send' /Library/Ruby/Gems/1.8/gems/activerecord-2.0.2/lib/active_record/callbacks.rb:322:in `callback' /Library/Ruby/Gems/1.8/gems/activerecord-2.0.2/lib/active_record/callbacks.rb:294:in `destroy_without_transactions' /Library/Ruby/Gems/1.8/gems/activerecord-2.0.2/lib/active_record/transactions.rb:104:in `destroy' /Library/Ruby/Gems/1.8/gems/activerecord-2.0.2/lib/active_record/connection_adapters/abstract/database_statements.rb:66:in `transaction' /Library/Ruby/Gems/1.8/gems/activerecord-2.0.2/lib/active_record/transactions.rb:80:in `transaction' /Library/Ruby/Gems/1.8/gems/activerecord-2.0.2/lib/active_record/transactions.rb:100:in `transaction' /Library/Ruby/Gems/1.8/gems/activerecord-2.0.2/lib/active_record/transactions.rb:104:in `destroy' ./test/unit/task_test.rb:37:in `test_should_destroy' /Library/Ruby/Gems/1.8/gems/activesupport-2.0.2/lib/active_support/testing/default.rb:7:in `run'
If I comment out "acts_as_taggable", then the test runs fine.
What is really driving me crazy is that in normal execution, the destroy works just fine.
ANY help or IDEAS would be GREATLY GREATLY GREATLY appreciated.
Thanks in advance,
Alan