RSPEC general command Flashcards

1
Q

How to run spec with specif random order?

A

rspec spec/test_spec.rb –seed 12345

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
2
Q

What do we need Rspec bisect command? And how to use it?

A

RSpec’s –order random and –seed options help surface flickering examples that only fail when one or more other examples are executed first. It can be very difficult to isolate the exact combination of examples that triggers the failure. The –bisect flag helps solve that problem.

Pass the –bisect option (in addition to –seed and any other options) and RSpec will repeatedly run subsets of your suite in order to isolate the minimal set of examples that reproduce the same failures

rspec spec/test_spec.rb –seed 12345 –bisect

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
3
Q

How to run only specific specs?

A

You can add “f” before the spec (focus: true)

fit ‘works’ {}

How well did you know this?
1
Not at all
2
3
4
5
Perfectly