# Why does it still call transaction items with transaction support turned off?

**URL:** <https://www.ruby-forum.com/t/why-does-it-still-call-transaction-items-with-transaction-support-turned-off/134862>\
**Category:** Rails\
**Created:** [April 15, 2008, 6:58pm UTC](https://www.ruby-forum.com/t/why-does-it-still-call-transaction-items-with-transaction-support-turned-off/134862 "2008-04-15T18:58:51Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![apswartz](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/a/71e660/32.png) [@apswartz](https://www.ruby-forum.com/u/apswartz)\
**Post date:** [April 15, 2008, 6:58pm UTC](https://www.ruby-forum.com/t/why-does-it-still-call-transaction-items-with-transaction-support-turned-off/134862/1 "2008-04-15T18:58:51Z")

</div>

I am pulling my hair out here (and I don’t have much to spare.)

I changed Line 22 of test\_helper.rb to read:  
self.use\_transactional\_fixtures = false #trying to get things to work

However, I am still getting the following error when I run the task  
unit test. (source at bottom of message)

1. Error:  
test\_create\_read\_update\_delete(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:29:in`test\_create\_read\_update\_delete’  
/Library/Ruby/Gems/1.8/gems/activesupport-2.0.2/lib/active\_support/testing/default.rb:7:in  
`run’

I am TRYING to be good and run tests, but since this works in the  
actual code but FAILS in my testing, it is discouraging me from  
writing more tests. ANY help would be GREATLY appreciated…

Thanks!!

–Alan

(source code for test)  
def test\_create\_read\_update\_delete  
adminUser = User.find\_by\_login(‘admin’)  
# create a new task  
task1 = Task.new(:description =\> “Description”,  
:done =\> false,  
:user =\> adminUser)  
assert task1.save;  
# read back task  
task2 = Task.find(task1.id)

```
# compare the descriptions
assert_equal task1.description, task2.description

# mark as done
task2.done = true

# save the changes
assert task2.save

# gets killed
assert task2.destroy

```

end
