Getting Started
This guide walks you through installing Scampi and writing your first test.
Requirements
- Ruby >= 3.3
- ripgrep (
rg) -- used to discover test files
Installation
Add Scampi to your Gemfile:
gem "scampi"
Or install it directly:
gem install scampi
Writing Your First Test
Create a file called greet.rb:
def greet(name) = "hello #{name}"
test do
it "greets by name" do
greet("world").should == "hello world"
end
end
Run it directly:
ruby greet.rb
Or with the scampi runner:
scampi greet.rb
Running All Tests
When invoked without arguments, scampi uses rg to find every file containing a test do block and runs them all:
bundle exec scampi