]> gitweb.factorcode.org Git - factor.git/blob - extra/webapps/mason/backend/backend-tests.factor
factor: rename [ ] [ ] unit-test -> { } [ ] unit-test using a refactoring tool!
[factor.git] / extra / webapps / mason / backend / backend-tests.factor
1 USING: continuations db db.sqlite io.directories io.files.temp
2 webapps.mason.backend tools.test ;
3 IN: webapps.mason.backend.tests
4
5 [ "mason-test.db" temp-file delete-file ] ignore-errors
6
7 { 0 1 2 } [
8     ! Do it in a with-transaction to simulate semantics of
9     ! with-mason-db
10     "mason-test.db" temp-file <sqlite-db> [
11         [
12             init-mason-db
13
14             counter-value
15             increment-counter-value
16             increment-counter-value
17         ] with-transaction
18     ] with-db
19 ] unit-test