Interaction with focus and --only-failures
Created by: BestFriendChris
Hi there. I just noticed something odd with the interaction between the focus tag and --only-failures
.
My rspec config is set up like so:
RSpec.configure do |config|
config.filter_run_when_matching :focus
config.example_status_persistence_file_path = 'tmp/spec_results.txt'
end
In a few of my specs, I'm using fdescribe
to only run a subset of my entire suite.
It appears that when using rspec --only-failures
in this scenario, all of the focused specs are running, not just the failed ones.
$ rspec --only-failures
Run options:
include {:focus=>true, :last_run_status=>"failed"}
Randomized with seed 5034
...F.
When I change all of the fdescribe
s to describe
it works as expected.
$ rspec --only-failures
Run options:
include {:last_run_status=>"failed"}
Randomized with seed 50880
F