-
-
Notifications
You must be signed in to change notification settings - Fork 762
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
[help] How can I fail CI early if any examples are focused? #1747
Comments
RSpec.configure do |config|
if ENV['CI']
config.before(:example, :focus) { raise "Should not commit focused specs" }
else
config.filter_run focus: true
config.run_all_when_everything_filtered = true
end
end Most CI services (such as travis) set a |
Thanks! |
Actually, I wonder if our generated What do others think? /cc @rspec/rspec |
Looks useful. And of course with appropriate comment before this if block Best Regards, 2014-10-24 2:27 GMT+02:00 Myron Marston notifications@github.com:
|
@myronmarston I'm not for making this automatic. I feel like it's a bit too specific. Also, there are times I am working on a feature branch and I do not want CI to run the full suite yet, but I do want it to run my focus specs for the entire build matrix. |
Based on this issue/idea in RSpec: rspec/rspec-core#1747
My spec_helper has the standard:
That's great for while I'm working on something, but I want my CI build to fail if I accidentally commit a focused spec.
(also asked here: https://stackoverflow.com/questions/26536694/examine-rspec-examples-without-running-them)
The text was updated successfully, but these errors were encountered: