I'm using guard with rspec and cucumber. To run the selected specs continuously, I just use focus
tag to nail what I want to work on.
But the problem is that I want to ran all of the specs if there are no specs with that tag.
How can I do that?
NOTE:: I am aware of all the RSpec options. So please reply only after you've read the question.
I achieve the behavior you've described with the following config:
# to run only specific specs, add :focus to the spec
# describe "foo", :focus do
# OR
# it "should foo", :focus do
config.treat_symbols_as_metadata_keys_with_true_values = true # default in rspec 3
config.filter_run :focus => true
config.run_all_when_everything_filtered = true
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With