Multiple inheritance
This change would allow you to specify multiple fabricators to inherit from instead of just one. This would allow you to compose a new fabricator from a non-linear set of upstream fabricators. It would look like this in a definition.
Fabricator(:parent1) do
number_field 1
extra_field 'should appear'
end
Fabricator(:parent2) do
number_field 2
string_field 'two'
end
Fabricator(:example, from: %i[parent1, parent2]) do
another_field 'also should appear'
end
The generator would apply the declared schematics in order when generating, producing the following output from the above example.
Fabricate(:example)
#<Example:0x0000000000000000
number_field: 2,
extra_field: 'should appear',
string_field: 'two',
another_field: 'also should appear'>