This is most critical when you want to say that actually you want no rows at all back from the database - so you can now use Test::DatabaseRow to assert that nothing matching this SELECT statement is in the database.
I also wanted to add functionality that allows you to say how many of the returned rows must match the assertions. Typical values will be 'the first one' (default) 'at least one' 'all of them' 'at least n'. However, when I sat down to think about implementation, I realised that this is quite a bit harder than I first imagined, at least in terms of providing a nice interface and helpful debug information for failing tests. So, the XP fairy sitting over my left shoulder handily pointed out that I'd made the minimum changes I'd needed to, and I should stop.
So, latest release on the CPAN, expect another release soonish (when I get another blast of JFDI.)
And anyway, that's work code, and it was the weekend, darnit!
Test::DatabaseRow improvements 0 Comments More | Login | Reply /