fixture

Provides test fixtures: resources that are automatically created and destroyed for each RackUnit test case


Keywords
disposable, experimental, io, rackunit, testing, racket-library
License
Apache-2.0

Documentation

racket-fixture

An experimental Racket library providing fixtures, test-case-specific disposables with automatic setup and teardown

(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 ...))