[Backgroundrb-devel] unit tests vs database state
Phlip
phlip2005 at gmail.com
Sun Feb 18 17:22:34 EST 2007
BackgrounDRb-ers:
I have this friend who claims that everything should have a unit test. We
want to use BackgrounDRb in a test-first setting.
When I update a database, to get it ready for testing, the update happens
inside the MySQL transaction of the test process. The worker then runs in
another process and sees the database's original state.
Turning off the transactions, in test_helper.rb, doesn't fix this effect.
I discovered that effect on one project, and worked around it. Now I will
try to write unit tests for another project, and I will report back here if
the effect gets better, or worse. I'm just asking in advance, to see if
anyone has discovered this problem, and how to fix it...
--
Phlip
http://www.greencheese.us/ZeekLand <-- NOT a blog!!!
More information about the Backgroundrb-devel
mailing list