lib/rubocop/cop/rspec/file_path.rb in rubocop-rspec-2.11.1 vs lib/rubocop/cop/rspec/file_path.rb in rubocop-rspec-2.12.0
- old
+ new
@@ -115,11 +115,12 @@
'.*_spec\.rb'
end
def name_pattern(method_name)
return unless method_name&.str_type?
+ return if ignore_methods?
- ".*#{method_name.str_content.gsub(/\W/, '')}" unless ignore_methods?
+ ".*#{method_name.str_content.gsub(/\s/, '_').gsub(/\W/, '')}"
end
def expected_path(constant)
File.join(
constant.const_name.split('::').map do |name|