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