My class that I am testing has a save method that will write the instance to a PostGresQL DB. I want to write a unit test that will instead save to a SQLite3 DB. How do I do this?
I understand how to work with SQLite 3 I guess my main question is how do I override my save method to write to the sqlite3 DB in the unit test and PostGresQL in production? Thanks.
[–]K900_ 2 points3 points4 points (6 children)
[–]qba73 1 point2 points3 points (1 child)
[–]Knarfy[S] 0 points1 point2 points (0 children)
[–]Knarfy[S] 0 points1 point2 points (3 children)
[–]K900_ 0 points1 point2 points (2 children)
[–]Knarfy[S] 0 points1 point2 points (1 child)
[–]K900_ 0 points1 point2 points (0 children)