We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
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
Specs without _spec.rb suffix will not be run by bare bin/rspec (no path)
bin/rspec
# spec/support/spec_file_name_enforcer.rb RSpec.configure do |config| config.before(:suite) do files_without_spec_suffix = Dir.glob('spec/**/*').select do |filename| File.file?(filename) && !filename.match(/_spec\.rb\z/) && !filename.match(%r{\Aspec/(support|factories|mailers/previews)/}) && !filename.match(%r{\Aspec/(spec_helper\.rb|rails_helper\.rb|examples\.txt)\z}) end if files_without_spec_suffix.any? raise 'Spec files need _spec.rb suffix: ' + files_without_spec_suffix.join(', ') end end end
The text was updated successfully, but these errors were encountered:
No branches or pull requests
Specs without _spec.rb suffix will not be run by bare
bin/rspec
(no path)The text was updated successfully, but these errors were encountered: