rspec

Behavior-driven development testing framework written in Ruby to test Ruby code. More information: <https://rspec.info>.

Install

All systems
curl cmd.cat/rspec.sh
Debian Debian
apt-get install ruby-rspec-core
Ubuntu
apt-get install ruby-rspec-core
Alpine
apk add ruby-rspec-core
Arch Arch Linux
pacman -S ruby-rspec-core
image/svg+xml Kali Linux
apt-get install ruby-rspec-core
Fedora
dnf install ruby-rspec-core
Windows (WSL2)
sudo apt-get update sudo apt-get install ruby-rspec-core
Raspbian
apt-get install ruby-rspec-core
Docker
docker run cmd.cat/rspec rspec powered by Commando

Behavior-driven development testing framework written in Ruby to test Ruby code. More information: <https://rspec.info>.

  • Initialize an .rspec config and a spec helper file:
    rspec --init
  • Run all tests:
    rspec
  • Run a specific directory of tests:
    rspec path/to/directory
  • Run a specific test file:
    rspec path/to/file
  • Run multiple test files:
    rspec path/to/file1 path/to/file2
  • Run a specific test in a file (e.g. the test starts on line 83):
    rspec path/to/file:83
  • Run specs with a specific seed:
    rspec --seed seed_number

© tl;dr; authors and contributors