Scampi
A small Ruby test framework forked from Bacon with built-in TAP version 14 output. Tests can live alongside your implementation code using co-located test blocks that only run when the file is executed directly or via the scampi CLI.
Requires Ruby >= 3.3 and ripgrep for test discovery.
Usage
Please browse the source code index or refer to the guides below.
Getting Started
This guide walks you through installing Scampi and writing your first test.
Co-Located Tests
Scampi lets you place tests alongside your implementation code using the test block. The block only executes when the file is run directly or via the scampi CLI.
Assertions
Scampi provides a chainable .should DSL for assertions. Every assertion is counted as a TAP requirement.
Exceptions and Flow Control
Scampi can assert on exceptions, throws, and state changes.
GitHub Actions
This guide shows how to run Scampi tests in CI with GitHub Actions.
See Also
- TAP (Test Anything Protocol)
- Bacon - The original project Scampi was forked from.
License
Released under the MIT License. See COPYING for details.