Skip to content

Instantly share code, notes, and snippets.

@Lockyy
Last active June 6, 2023 16:21
Show Gist options
  • Save Lockyy/b0a143f675db5ffb6e840dc1175d44aa to your computer and use it in GitHub Desktop.
Save Lockyy/b0a143f675db5ffb6e840dc1175d44aa to your computer and use it in GitHub Desktop.
Triggers a failure automatically when a focused spec is encountered
if ENV['CI']
config.before(:example, :focus) {
raise "You've added a focused spec to a commit, this'll prevent CI from running properly and you should remove this."
}
else
config.filter_run focus: true
config.run_all_when_everything_filtered = true
end
@Lockyy
Copy link
Author

Lockyy commented Feb 25, 2020

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment