Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Expose 'with default RSpec/Language config' to consumers
This helper is essential for anyone writing their own RSpec cops based on `RuboCop::Cop::RSpec::Base`, because it now requires a minimal config to even run the cop. The wordy file name is because the RuboCop gem already defines `rubocop/rspec/shared_contexts`, and we don't want to shadow that. This means that consumers of this library who want to write a spec for a cop based on `RuboCop::Cop::RSpec::Base` will need something like this in `spec/spec_helper.rb`: require 'rubocop/rspec/shared_contexts/default_rspec_language_config_context' RSpec.config do |config| # ... # Add metadata as appropriate config.include_context 'with default RSpec/Language config' end
- Loading branch information