lib/rubocop/cop/codeur/rails_app_patterns.rb in rubocop-codeur-0.3.0 vs lib/rubocop/cop/codeur/rails_app_patterns.rb in rubocop-codeur-0.4.0
- old
+ new
@@ -53,10 +53,10 @@
yield msg if msg
end
def pattern_from_path(path)
- return nil unless path.match(%r{/app/(?<pattern>.+)/.+})
+ return nil unless path.match(%r{/(?<folder>app|test)/(?<pattern>.+)/.+})
Regexp.last_match(:pattern)
end
def pattern_forbidden?(pattern)