Strange Error occurs when running [rake test:functionals]


#1

Hi,

I’m at my wits end :slight_smile:

I have a functional test that invokes the destroy action of one of my
controllers, this in turn removes a record from the database. If I
run the test like this [ruby test/functionals/admin/
version_controller_test.rb], the test passes… as it should.

However, if I run rake test:functionals from my app dir, I get a
SystemStackError

If anyone has a clue as to what might be causing this, please let me
know. Below is the stack trace:

Regards,
Steven

  1. Error:
    test_destroy_software_version(Admin::VersionsControllerTest):
    SystemStackError: stack level too deep
    (eval):3:in destroy_without_habtm_shim_for_operating_systems' (eval):4:indestroy_without_habtm_shim_for_operating_systems’
    (eval):4:in destroy_without_callbacks' /usr/local/lib/ruby/gems/1.8/gems/activerecord-1.15.2/lib/ active_record/callbacks.rb:321:indestroy_without_transactions’
    /usr/local/lib/ruby/gems/1.8/gems/activerecord-1.15.2/lib/
    active_record/transactions.rb:125:in destroy' /usr/local/lib/ruby/gems/1.8/gems/activerecord-1.15.2/lib/ active_record/connection_adapters/abstract/database_statements.rb: 59:intransaction’
    /usr/local/lib/ruby/gems/1.8/gems/activerecord-1.15.2/lib/
    active_record/transactions.rb:95:in transaction' /usr/local/lib/ruby/gems/1.8/gems/activerecord-1.15.2/lib/ active_record/transactions.rb:121:intransaction’
    /usr/local/lib/ruby/gems/1.8/gems/activerecord-1.15.2/lib/
    active_record/transactions.rb:125:in destroy' /srv/www/rails_apps/software_central/config/../app/controllers/ admin/versions_controller.rb:65:indestroy’
    /usr/local/lib/ruby/gems/1.8/gems/actionpack-1.13.2/lib/
    action_controller/base.rb:1095:in send' /usr/local/lib/ruby/gems/1.8/gems/actionpack-1.13.2/lib/ action_controller/base.rb:1095:inperform_action_without_filters’
    /usr/local/lib/ruby/gems/1.8/gems/actionpack-1.13.2/lib/
    action_controller/filters.rb:632:in call_filter' /usr/local/lib/ruby/gems/1.8/gems/actionpack-1.13.2/lib/ action_controller/filters.rb:638:incall_filter’
    /usr/local/lib/ruby/gems/1.8/gems/actionpack-1.13.2/lib/
    action_controller/filters.rb:438:in call' /usr/local/lib/ruby/gems/1.8/gems/actionpack-1.13.2/lib/ action_controller/filters.rb:637:incall_filter’
    /usr/local/lib/ruby/gems/1.8/gems/actionpack-1.13.2/lib/
    action_controller/filters.rb:619:in perform_action_without_benchmark' /usr/local/lib/ruby/gems/1.8/gems/actionpack-1.13.2/lib/ action_controller/benchmarking.rb:66:inperform_action_without_rescue’
    /usr/local/lib/ruby/1.8/benchmark.rb:293:in measure' /usr/local/lib/ruby/gems/1.8/gems/actionpack-1.13.2/lib/ action_controller/benchmarking.rb:66:inperform_action_without_rescue’
    /usr/local/lib/ruby/gems/1.8/gems/actionpack-1.13.2/lib/
    action_controller/rescue.rb:83:in perform_action' /usr/local/lib/ruby/gems/1.8/gems/actionpack-1.13.2/lib/ action_controller/base.rb:430:insend’
    /usr/local/lib/ruby/gems/1.8/gems/actionpack-1.13.2/lib/
    action_controller/base.rb:430:in process_without_filters' /usr/local/lib/ruby/gems/1.8/gems/actionpack-1.13.2/lib/ action_controller/filters.rb:624:inprocess_without_session_management_support’
    /usr/local/lib/ruby/gems/1.8/gems/actionpack-1.13.2/lib/
    action_controller/session_management.rb:114:in process_without_test' /usr/local/lib/ruby/gems/1.8/gems/actionpack-1.13.2/lib/ action_controller/test_process.rb:15:inprocess’
    /usr/local/lib/ruby/gems/1.8/gems/actionpack-1.13.2/lib/
    action_controller/test_process.rb:382:in process' /usr/local/lib/ruby/gems/1.8/gems/actionpack-1.13.2/lib/ action_controller/test_process.rb:353:inget’
    ./test/functional/admin/versions_controller_test.rb:136:in
    `test_destroy_software_version’

52 tests, 354 assertions, 0 failures, 1 errors
rake aborted!
Command failed with status (1): [/usr/local/bin/ruby -Ilib:test "/usr/
local…]
/usr/local/lib/ruby/gems/1.8/gems/rake-0.7.1/lib/rake.rb:722:in sh' /usr/local/lib/ruby/gems/1.8/gems/rake-0.7.1/lib/rake.rb:729:incall’
/usr/local/lib/ruby/gems/1.8/gems/rake-0.7.1/lib/rake.rb:729:in sh' /usr/local/lib/ruby/gems/1.8/gems/rake-0.7.1/lib/rake.rb:812:insh’
/usr/local/lib/ruby/gems/1.8/gems/rake-0.7.1/lib/rake.rb:747:in ruby' /usr/local/lib/ruby/gems/1.8/gems/rake-0.7.1/lib/rake.rb:812:inruby’
/usr/local/lib/ruby/gems/1.8/gems/rake-0.7.1/lib/rake/testtask.rb:
117:in define' /usr/local/lib/ruby/gems/1.8/gems/rake-0.7.1/lib/rake.rb:831:inverbose’
/usr/local/lib/ruby/gems/1.8/gems/rake-0.7.1/lib/rake/testtask.rb:
102:in define' /usr/local/lib/ruby/gems/1.8/gems/rake-0.7.1/lib/rake.rb:387:incall’
/usr/local/lib/ruby/gems/1.8/gems/rake-0.7.1/lib/rake.rb:387:in
execute' /usr/local/lib/ruby/gems/1.8/gems/rake-0.7.1/lib/rake.rb:387:ineach’
/usr/local/lib/ruby/gems/1.8/gems/rake-0.7.1/lib/rake.rb:387:in
execute' /usr/local/lib/ruby/gems/1.8/gems/rake-0.7.1/lib/rake.rb:357:ininvoke’
/usr/local/lib/ruby/1.8/thread.rb:135:in synchronize' /usr/local/lib/ruby/gems/1.8/gems/rake-0.7.1/lib/rake.rb:350:ininvoke’
/usr/local/lib/ruby/gems/1.8/gems/rake-0.7.1/lib/rake.rb:1906:in run' /usr/local/lib/ruby/gems/1.8/gems/rake-0.7.1/lib/rake.rb:1906:ineach’
/usr/local/lib/ruby/gems/1.8/gems/rake-0.7.1/lib/rake.rb:1906:in run' /usr/local/lib/ruby/gems/1.8/gems/rake-0.7.1/bin/rake:7 /usr/local/bin/rake:18:inload’
/usr/local/bin/rake:18