Sha256: 2d57b36063da315248638d5f5dee2d6e87923acbc93a72f5f7feee462648872f
Contents?: true
Size: 677 Bytes
Versions: 5
Compression:
Stored size: 677 Bytes
Contents
require 'swordfish/native/specification' module Pod class Specification class Linter # !@group Lint steps # Checks that the spec's root name matches the filename. # # @return [void] # def validate_root_name if spec.root.name && file acceptable_names = Specification::VALID_EXTNAME.map { |extname| "#{spec.root.name}#{extname}" } names_match = acceptable_names.include?(file.basename.to_s) unless names_match results.add_error('name', 'The name of the spec should match the ' \ 'name of the file.') end end end end end end
Version data entries
5 entries across 5 versions & 1 rubygems