Sha256: 834313ce2e24a4249f2e570b0c14eb9ec53c8e989851e28917ff10fde650ec00
Contents?: true
Size: 417 Bytes
Versions: 54
Compression:
Stored size: 417 Bytes
Contents
# Finds leaking constants created during ROM specs module ConstantLeakFinder def self.find(example) constants = Object.constants example.run added_constants = (Object.constants - constants) added = added_constants.map(&Object.method(:const_get)) if added.any? { |mod| mod.ancestors.map(&:name).grep(/\AROM/).any? } raise "Leaking constants: #{added_constants.inspect}" end end end
Version data entries
54 entries across 54 versions & 3 rubygems