-
-
Notifications
You must be signed in to change notification settings - Fork 153
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Abort on active rspec --focus
option
#123
Comments
I don't have any specs tagged with |
This is expected behavior and the way rspec works. I cannot fix it? |
@mbj Why is this expected? I don't see why mutant should be incompatible with some rspec configurations. |
@mockdeep Rspec filters example groups internally when |
@mbj Is this the case when no examples are focused, though? I haven't marked any examples as focused, I've just enabled the configuration setting in spec_helper. |
this bit me too, maybe a bit in the README would help? |
@djbender We should add a note to the README, and we could peek into active rspec configuration to make mutant complain when this flag was set. I'd accept PRs for both. I'll not close this issue until mutant complains when rspec is in invalid state for mutant integration. |
@djbender I meant: Do you wana PR the README change? |
When I get some free time I'll take a look!! thanks for the quick response. |
--focus
option
Not usually one to bump issues, but I got burned by this for like an hour since I had a totally unrelated spec focused and mutant reports the selected tests as having run. Would good be a nice thing to fix. I'd be happiest with something that aborts if the selected tests gets filtered down to zero when focus filter is applied |
@backus same here, so will definitively add it soon thanks for bumping. I'm getting more and more mutant time recently. |
8y ;) |
I opted for doing something "generic", not scoped to rspec/minitest integrations but simply: Whenever you request mutant to run on 0 effective tests: It prints a nice warning message aborting early. Next step is to print the message on 0 selected tests. |
@backus it could actually be you need a slight change from what I did, in making mutant complain on having 0 selected tests, as the focus option may keep 1-2 tests of 1k in? |
When I add the following config to my spec_helper file all mutations fail except the noop:
The text was updated successfully, but these errors were encountered: