spec/project/default_config_spec.rb in rubocop-rspec-1.22.2 vs spec/project/default_config_spec.rb in rubocop-rspec-1.23.0
- old
+ new
@@ -5,13 +5,14 @@
let(:cop_names) do
namespaces = {
'rspec' => 'RSpec',
'capybara' => 'Capybara',
- 'factory_bot' => 'FactoryBot'
+ 'factory_bot' => 'FactoryBot',
+ 'rails' => 'Rails'
}
- glob = SpecHelper::ROOT.join('lib', 'rubocop', 'cop',
- 'rspec', '{capybara/,,factory_bot/}*.rb')
+ glob = SpecHelper::ROOT.join('lib', 'rubocop', 'cop', 'rspec',
+ '{,capybara,factory_bot,rails}', '*.rb')
cop_names =
Pathname.glob(glob).map do |file|
file_name = file.basename('.rb').to_s
cop_name = file_name.gsub(/(^|_)(.)/) { Regexp.last_match(2).upcase }
namespace = namespaces[file.dirname.basename.to_s]