1
0
Fork 0
mirror of https://github.com/tldr-pages/tldr.git synced 2025-07-01 11:15:23 +02:00
tldr/pages/common/rspec.md
Vitor Henrique af35564618
pages*: do not use config abbreviation (#12118)
Co-authored-by: K.B.Dharun Krishna <kbdharunkrishna@gmail.com>
2024-01-25 10:59:16 +05:30

604 B

rspec

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

  • Initialize an .rspec configuration 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}}