Small Business Resources

I spend the better part of my time advising Small Business on the ins and outs of Online Marketing. Pop over to eBiz4Results.com for the full story.

Current Project

At the end of 2008, I launched BestMacTools.com where you will find reviews, and commentary mostly related to Productivity Tools for Mac OS X.

For Bloggers

It is now just about axiomatic... the most effective online marketing tool for any business is a Blog. That's why I publish Blog4Results.com.

May
30

Rails testing with sqlite

By Nigel Ball

Just a quick note with an answer to an issue which has been bugging me for days.

The problem

Tests run OK within Eclipse but fail miserably from the command line with an error like…

Started
...E
../lib/sqlite3/errors.rb:94:in `check': cannot rollback - no transaction is active (SQLite3::SQLException)

The diagnosis

It seems that the test runner automatically loads fixtures even if not asked to do so. The template fixture files contain stubs for test records which cause sqlite3 to choke.

The solution

Just make sure that fixture files actually contain real fixtures that are needed for your testing!

Categories : Ruby on Rails

This website uses IntenseDebate comments, but they are not currently loaded because either your browser doesn't support JavaScript, or they didn't load fast enough.