Okay … I completely misread that code. Sorry about that.
Looking at the ActiveRecord transaction docs I wonder if you couldn't check to see that the thread had fired start_db_transaction, as it appears to do so when the transaction is started. However the Transaction::Simple module has a method transaction_open? that looks like it could verify a transaction was currently open, using named transactions.
I must admit I don't do much with RoR, so if the above doesn't help I hope hornbeck can provide some insight. :)