Hi,
I’m at my wits end
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
- Error:
test_destroy_software_version(Admin::VersionsControllerTest):
SystemStackError: stack level too deep
(eval):3:indestroy_without_habtm_shim_for_operating_systems' (eval):4:in
destroy_without_habtm_shim_for_operating_systems’
(eval):4:indestroy_without_callbacks' /usr/local/lib/ruby/gems/1.8/gems/activerecord-1.15.2/lib/ active_record/callbacks.rb:321:in
destroy_without_transactions’
/usr/local/lib/ruby/gems/1.8/gems/activerecord-1.15.2/lib/
active_record/transactions.rb:125:indestroy' /usr/local/lib/ruby/gems/1.8/gems/activerecord-1.15.2/lib/ active_record/connection_adapters/abstract/database_statements.rb: 59:in
transaction’
/usr/local/lib/ruby/gems/1.8/gems/activerecord-1.15.2/lib/
active_record/transactions.rb:95:intransaction' /usr/local/lib/ruby/gems/1.8/gems/activerecord-1.15.2/lib/ active_record/transactions.rb:121:in
transaction’
/usr/local/lib/ruby/gems/1.8/gems/activerecord-1.15.2/lib/
active_record/transactions.rb:125:indestroy' /srv/www/rails_apps/software_central/config/../app/controllers/ admin/versions_controller.rb:65:in
destroy’
/usr/local/lib/ruby/gems/1.8/gems/actionpack-1.13.2/lib/
action_controller/base.rb:1095:insend' /usr/local/lib/ruby/gems/1.8/gems/actionpack-1.13.2/lib/ action_controller/base.rb:1095:in
perform_action_without_filters’
/usr/local/lib/ruby/gems/1.8/gems/actionpack-1.13.2/lib/
action_controller/filters.rb:632:incall_filter' /usr/local/lib/ruby/gems/1.8/gems/actionpack-1.13.2/lib/ action_controller/filters.rb:638:in
call_filter’
/usr/local/lib/ruby/gems/1.8/gems/actionpack-1.13.2/lib/
action_controller/filters.rb:438:incall' /usr/local/lib/ruby/gems/1.8/gems/actionpack-1.13.2/lib/ action_controller/filters.rb:637:in
call_filter’
/usr/local/lib/ruby/gems/1.8/gems/actionpack-1.13.2/lib/
action_controller/filters.rb:619:inperform_action_without_benchmark' /usr/local/lib/ruby/gems/1.8/gems/actionpack-1.13.2/lib/ action_controller/benchmarking.rb:66:in
perform_action_without_rescue’
/usr/local/lib/ruby/1.8/benchmark.rb:293:inmeasure' /usr/local/lib/ruby/gems/1.8/gems/actionpack-1.13.2/lib/ action_controller/benchmarking.rb:66:in
perform_action_without_rescue’
/usr/local/lib/ruby/gems/1.8/gems/actionpack-1.13.2/lib/
action_controller/rescue.rb:83:inperform_action' /usr/local/lib/ruby/gems/1.8/gems/actionpack-1.13.2/lib/ action_controller/base.rb:430:in
send’
/usr/local/lib/ruby/gems/1.8/gems/actionpack-1.13.2/lib/
action_controller/base.rb:430:inprocess_without_filters' /usr/local/lib/ruby/gems/1.8/gems/actionpack-1.13.2/lib/ action_controller/filters.rb:624:in
process_without_session_management_support’
/usr/local/lib/ruby/gems/1.8/gems/actionpack-1.13.2/lib/
action_controller/session_management.rb:114:inprocess_without_test' /usr/local/lib/ruby/gems/1.8/gems/actionpack-1.13.2/lib/ action_controller/test_process.rb:15:in
process’
/usr/local/lib/ruby/gems/1.8/gems/actionpack-1.13.2/lib/
action_controller/test_process.rb:382:inprocess' /usr/local/lib/ruby/gems/1.8/gems/actionpack-1.13.2/lib/ action_controller/test_process.rb:353:in
get’
./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:in
call’
/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:in
sh’
/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:in
ruby’
/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:in
verbose’
/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:in
call’
/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:in
each’
/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:in
invoke’
/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:in
invoke’
/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:in
each’
/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:in
load’
/usr/local/bin/rake:18