https://github.com/jackfirth/racket-fixture
An experimental Racket library that adds test fixtures to RackUnit
https://github.com/jackfirth/racket-fixture
io racket-library testing
Last synced: 4 months ago
JSON representation
An experimental Racket library that adds test fixtures to RackUnit
- Host: GitHub
- URL: https://github.com/jackfirth/racket-fixture
- Owner: jackfirth
- License: apache-2.0
- Created: 2017-07-22T00:11:03.000Z (over 8 years ago)
- Default Branch: master
- Last Pushed: 2017-09-19T03:30:03.000Z (over 8 years ago)
- Last Synced: 2025-09-12T01:57:23.029Z (4 months ago)
- Topics: io, racket-library, testing
- Language: Racket
- Homepage:
- Size: 31.3 KB
- Stars: 7
- Watchers: 2
- Forks: 0
- Open Issues: 5
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# racket-fixture [](https://travis-ci.org/jackfirth/racket-fixture) [](https://codecov.io/gh/jackfirth/racket-fixture)
An experimental Racket library providing *test fixtures*, resources that are automatically created and destroyed for each RackUnit test case.
```racket
(define-fixture tmpdir (disposable-directory))
(define-fixture tmpfile (disposable-file))
(test-case/fixture "tests"
#:fixture tmpdir
#:fixture tmpfile
(test-case "some-test"
... use tmpdir and tmpfile ...)
(test-case "other-test"
... use different tmpdir and tmpfile ...))
```
**This package depends on RackUnit version 1.8, which has not yet been released in the main distribution. The 6.11 Racket release will include it; you can also manually upgrade your installation of RackUnit.**
Available from the [Racket package catalog](https://pkgd.racket-lang.org/pkgn/package/fixture). To install:
```bash
raco pkg install fixture
```