Module: Nucop::Helpers::FilePathHelper

Included in:
ExplicitFactoryBotUsage, ShadowingFactoryBotCreationMethods
Defined in:
lib/nucop/helpers/file_path_helper.rb

Instance Method Summary collapse

Instance Method Details

#acceptance_or_spec_file?(filepath) ⇒ Boolean

Returns:

  • (Boolean)


4
5
6
# File 'lib/nucop/helpers/file_path_helper.rb', line 4

def acceptance_or_spec_file?(filepath)
  Pathname.new(filepath).fnmatch?(File.join("**", "{spec,acceptance}", "**"), File::FNM_EXTGLOB)
end

#support_file?(filepath) ⇒ Boolean

Returns:

  • (Boolean)


8
9
10
# File 'lib/nucop/helpers/file_path_helper.rb', line 8

def support_file?(filepath)
  Pathname.new(filepath).fnmatch?(File.join("**", "support", "**"), File::FNM_EXTGLOB)
end