Bats Installation

From NovaOrdis Knowledge Base
Jump to navigation Jump to search

Internal

bats-core Installation

bats-core Installation on Mac

# If bats was installed before:
brew unlink bats

brew install bats-core

bats --version
Bats 1.2.1

bats-core Installation on Linux

https://bats-core.readthedocs.io/en/stable/installation.html#any-os-installing-bats-from-source
git clone https://github.com/bats-core/bats-core.git

The bats script will be available as ./bats-core/bin/bats

Optionally, it can be installed in a different location with:

cd bats-core; ./install.sh <new-directory>

bats Installation


Obsolete

bats Installation on Mac

brew install bats
bats --version
0.4.0

bats Installation on Linux

git clone https://github.com/sstephenson/bats.git
cd bats
sudo ./install.sh /usr/local/