-USING: mason.disk tools.test strings sequences ;
+USING: mason.config mason.disk namespaces io.directories
+io.files.temp tools.test strings sequences ;
IN: mason.disk.tests
-[ t ] [ disk-usage string? ] unit-test
+"builds" temp-file builds-dir [
+ builds-dir get make-directories
-[ t ] [ sufficient-disk-space? { t f } member? ] unit-test
+ [ t ] [ disk-usage string? ] unit-test
+
+ [ t ] [ sufficient-disk-space? { t f } member? ] unit-test
+] with-variable
IN: mason.report.tests
-USING: io.files io.directories kernel mason.report mason.common
-tools.test xml xml.writer ;
+USING: io.files io.files.temp io.directories kernel mason.report
+mason.common mason.config namespaces tools.test xml xml.writer ;
{ 0 0 } [ [ ] with-report ] must-infer-as
[ ] [ "report" file>xml drop ] unit-test
[ ] [ "report" delete-file ] unit-test ;
-"resource:extra/mason/report/fake-data/" [
- [ ] [
- timings-table pprint-xml
- ] unit-test
-
- [ ] [ successful-report ] unit-test
- verify-report
-
- [ status-error ] [ 1234 compile-failed ] unit-test
- verify-report
-
- [ status-error ] [ 1235 boot-failed ] unit-test
- verify-report
-
- [ status-error ] [ 1236 test-failed ] unit-test
- verify-report
-] with-directory
+"builds" temp-file builds-dir [
+ "resource:extra/mason/report/fake-data/" [
+ [ ] [
+ timings-table pprint-xml
+ ] unit-test
+
+ [ ] [ successful-report ] unit-test
+ verify-report
+
+ [ status-error ] [ 1234 compile-failed ] unit-test
+ verify-report
+
+ [ status-error ] [ 1235 boot-failed ] unit-test
+ verify-report
+
+ [ status-error ] [ 1236 test-failed ] unit-test
+ verify-report
+ ] with-directory
+] with-variable