Think about Loose Coupling | |
PerlMonks |
comment on |
( [id://3333]=superdoc: print w/replies, xml ) | Need Help?? |
This is exactly what DBD::Mock was designed for ... kinda. Chris Winters, then stvn and I, planned DBD::Mock to be for people who use DBI directly. We have only just started playing with Class::DBI ourselves. It may be useful to come up with a way of mocking CDBI itself, because that's the interface you want to test, not DBI's interface. I suggest emailing the CDBI mailing list.
Some quick googling reveals http://www.spanner.org/lists/cdbi/2005/03/05/e66a0853.html, implying that DBD::Mock and CDBI don't work together out of the box, at least in that scenario. Maybe Class::DBI::Mock needs to be written. I don't think it's a simple thing, though, given the amount of work that goes on behind the scenes in CDBI and how tightly some of it's coupled to other things. My criteria for good software:
In reply to Re: Easier Mocking?
by dragonchild
|
|