To add a collaborator to this project you will need to use the Relish gem to add the collaborator via a terminal command. Soon you'll be able to also add collaborators here!
More about adding a collaborator`--fail-fast` option
Use the --fail-fast
option to tell RSpec to stop running the test suite on
the first failed test.
You may add a parameter to tell RSpec to stop running the test suite after N
failed tests, for example: --fail-fast=3
.
You can also specify --no-fail-fast
to turn it off (default behaviour).
- Background
-
- Given
-
a file named "fail_fast_spec.rb" with:
RSpec.describe "fail fast" do it "passing test" do; end it "1st failing test" do fail end it "2nd failing test" do fail end it "3rd failing test" do fail end it "4th failing test" do fail end it "passing test" do; end end
- Scenarios
-
- Using `--fail-fast`
-
- When
-
I run
rspec . --fail-fast
- Then
- the output should contain ".F"
- Then
- the output should not contain ".F."
- Using `--fail-fast=3`
-
- When
-
I run
rspec . --fail-fast=3
- Then
- the output should contain ".FFF"
- Then
- the output should not contain ".FFFF."
- Using `--no-fail-fast`
-
- When
-
I run
rspec . --no-fail-fast
- Then
- the output should contain ".FFFF."
Last published over 2 years ago by Jon Rowe.