Posts for November 2006
Unit testing in Rails - state of database when test fail
After some code refactoring some tests failed. Ok, that means something in code is wrong and that is great thing to know. Usually it is enough easy to check the test case where the problem occured and fix code in model. However my yesterday problem was a bit complicated because the action that should change create and change objects from dependant models obviously didn't do that in in the way it should. It would be easiest method to find where problem is to check the state of database just before test failed.
I am Bojan Mihelac and this blog is dedicated to share code, thoughts, tools and advices I came up with while working at