Add --fail-no-examples option: fail if no RSpec examples
Created by: xmik
I added a new command line option: --fail-no-examples
. It defaults to false, so default behavior is not changed. But, if this option is set and there are no RSpec examples to be run, exit status will be 1 (so far it was always 0).
Motivation
We use RSpec rake task on CI. Having updated RSpec from 3.3.0 to 3.5.0, there was some change in that rake task code. Without changing anything, the rake task resulted in running 0 examples and exit status was 0. Jobs were passed on CI, but I'd prefer if they were not.