lib/rubocop/cop/rspec/unit_spec_naming.rb in rubocop-rspec-0.18.0 vs lib/rubocop/cop/rspec/unit_spec_naming.rb in rubocop-rspec-0.18.1
- old
+ new
@@ -124,10 +124,10 @@
end
def camel_to_underscore(string)
string.dup.tap do |result|
result.gsub!(/([^A-Z])([A-Z]+)/, '\\1_\\2')
- result.gsub!(/([A-Z]+)([A-Z][^A-Z]+)/, '\\1_\\2')
+ result.gsub!(/([A-Z]{2,})([A-Z][^A-Z]+)/, '\\1_\\2')
result.downcase!
end
end
def regexp_from_glob(glob)