# functional tests vs SQLite3's transactions

**URL:** <https://discuss.rubyonrails.org/t/functional-tests-vs-sqlite3s-transactions/1719>\
**Category:** rubyonrails-talk\
**Created:** [September 16, 2006, 8:20pm UTC](https://discuss.rubyonrails.org/t/functional-tests-vs-sqlite3s-transactions/1719 "2006-09-16T20:20:46Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![Phlip](https://avatars.discourse-cdn.com/v4/letter/p/ed8c4c/32.png) [@Phlip](https://discuss.rubyonrails.org/u/Phlip)\
**Post date:** [September 16, 2006, 8:20pm UTC](https://discuss.rubyonrails.org/t/functional-tests-vs-sqlite3s-transactions/1719/1 "2006-09-16T20:20:46Z")

</div>

Railsters:

I have just started a Rails site. I got SQLite3 working sooner than MySQL, so I went with the former.

Then I ran 'rake test', and received major spewage, including this:

cannot rollback - no transaction is active (SQLite3::SQLException)

Then I installed Salted Hash Login Generator, and README\_USER\_LOGIN told me:

"Whatever DB you use, it must support transactions. If it does not, the functional tests will not work properly..."

Then I googled for SQLite's situation, and got this:

[http://web.utk.edu/~jplyon/sqlite/SQLite\_optimization\_FAQ.html](http://web.utk.edu/~jplyon/sqlite/SQLite_optimization_FAQ.html)

"Although SQLite parses named transactions, the names are ignored. SQLite does not support nested transactions."

So which is it? Will SQLite3 work, and support the functional tests, or do the functional tests require named or nested transactions? Or is something else going on?

---

<div class="post-metadata">

**Author:** ![Phlip](https://avatars.discourse-cdn.com/v4/letter/p/ed8c4c/32.png) [@Phlip](https://discuss.rubyonrails.org/u/Phlip)\
**Post date:** [September 16, 2006, 11:26pm UTC](https://discuss.rubyonrails.org/t/functional-tests-vs-sqlite3s-transactions/1719/2 "2006-09-16T23:26:12Z")

</div>

Aaaaaand when I switch to Win32 and switch to MySQL, all the errors go away.

So it looks like SQLite3's transactions do not satisfy the SHLG.

I also get a new rump-load of errors like these:

&nbsp;&nbsp;1) Failure: test\_auth(UserTest) [./test/unit/user\_test.rb:9]: \<nil\> expected but was \<#\<User:0x3c830f8 @attributes=...

So off I go Googling and FAQing again! (-;
