2020-10-14 23:04:01 +01:00
|
|
|
# rspec
|
|
|
|
|
|
|
|
> Behavior-driven development testing framework written in Ruby to test Ruby code.
|
|
|
|
> More information: <https://rspec.info>.
|
|
|
|
|
2024-01-25 05:29:16 +00:00
|
|
|
- Initialize an .rspec configuration and a spec helper file:
|
2020-10-14 23:04:01 +01:00
|
|
|
|
|
|
|
`rspec --init`
|
|
|
|
|
|
|
|
- Run all tests:
|
|
|
|
|
|
|
|
`rspec`
|
|
|
|
|
|
|
|
- Run a specific directory of tests:
|
|
|
|
|
|
|
|
`rspec {{path/to/directory}}`
|
|
|
|
|
2024-01-31 03:55:19 +00:00
|
|
|
- Run one or more test files:
|
2020-10-14 23:04:01 +01:00
|
|
|
|
2024-01-31 03:55:19 +00:00
|
|
|
`rspec {{path/to/file1 path/to/file2 ...}}`
|
2020-10-14 23:04:01 +01:00
|
|
|
|
|
|
|
- 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}}`
|