Created
October 9, 2019 08:03
-
-
Save franciscoj/2a560e1e6fdc9fa7a3fbd9a53ab18279 to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# If a spec in the suite is marked with focus on the CI it will fail. | |
RSpec::Matchers.define :have_no_focus do | |
match { |ex| !ex.metadata[:focus] } | |
failure_message(&:inspect) | |
end | |
RSpec.configure do |config| | |
config.before(:each) do |example| | |
expect(example).to have_no_focus if ENV['CI'] | |
end | |
end |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment