Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- use Context::Singleton;
- contrive 'db-connection' => (
- as => sub { DBI->connect (...) },
- );
- sub foo {
- deduce ('db-connection')->do (...);
- }
- # your tests
- frame {
- proclaim 'db-connection' => $fixture_connection_1;
- test foo;
- };
- frame {
- proclaim 'db-connection' => $fixture_connection_2;
- test foo;
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement