-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1
On Nov 1, 2005, at 7:33 AM, Raphael Bauduin wrote:> In my controller I have a transaction that has to be rolled back
> according to the data passed as parameter (@params), an exception
> being raised accordingly.
> When running it from the browser, the rollback happens as needed when
> the exception is raised.
> When testing it, passing the exact same @params, the rollback
doesn''t
> happen although the exception is raised (I put a breakpoint in the
> rescue part, and the breakpoint was run)..
>
> Anyone knows what happens? Does it have to do with the rollback done
> after each test method?
Hey Raph, turn off transactional fixtures for these tests:
class FooTest < Test::Unit::TestCase
self.use_transactional_fixtures = false
def test_whether_my_txn_rolled_back
#...
end
end
jeremy
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.2 (Darwin)
iD8DBQFDZ+WDAQHALep9HFYRAvSYAJ9KC2pFmUAUp12vpQkRvuZxTMhXHACfWP9x
rX9SO0nccB5l7QTlSiq7SqI=hEz/
-----END PGP SIGNATURE-----