View on GitHub

ShellSpec - A full-featured BDD unit testing framework for dash, bash, ksh, zsh and all POSIX shells

Online Demo

Run the following command.

# Step 1. Install ShellSpec
. setup.sh

# Step 2. Run Sample tests
shellspec

# Step 3. Run ShellSpec tests
cd ~/.local/lib/shellspec/
shellspec

Do you want to see or edit the code in a browser? Open in Repl.it.

$ tree
.
|-- fizzbuzz.sh
|-- lib
|   `-- array.sh
`-- spec
    |-- fizzbuzz_spec.sh
    |-- array_spec.sh
    |-- system_spec.sh
    `-- spec_helper.sh

Demo running on Docker also available.

# How to run

docker run --rm -it shellspec/demo