Class: FactoryTrace::Preprocessors::ExtractDefined

Inherits:
Object
  • Object
show all
Defined in:
lib/factory_trace/preprocessors/extract_defined.rb

Class Method Summary collapse

Class Method Details

.callFactoryTrace::Structures::Collection



5
6
7
8
9
10
11
12
13
14
15
16
17
# File 'lib/factory_trace/preprocessors/extract_defined.rb', line 5

def self.call
  collection = FactoryTrace::Structures::Collection.new

  MonkeyPatches::REGISTER.traits.each do |trait|
    collection.add(FactoryTrace::Helpers::Converter.trait(trait))
  end

  FactoryBot.factories.each do |factory|
    collection.add(FactoryTrace::Helpers::Converter.factory(factory))
  end

  collection
end