factor/extra/webapps/mason/backend/backend-tests.factor

20 lines
510 B
Factor
Raw Normal View History

USING: continuations db io.directories io.files.temp tools.test
webapps.mason.backend webapps.utils ;
IN: webapps.mason.backend.tests
2010-09-04 21:05:28 -04:00
[ "mason-test.db" temp-file delete-file ] ignore-errors
2010-09-04 21:05:28 -04:00
{ 0 1 2 } [
! Do it in a with-transaction to simulate semantics of
! with-mason-db
"mason-test.db" <temp-sqlite-db> [
[
init-mason-db
2010-09-04 21:05:28 -04:00
counter-value
increment-counter-value
increment-counter-value
] with-transaction
2010-09-04 21:05:28 -04:00
] with-db
] unit-test