With your cursor anywhere on a line containing a FactoryBot reference, e.g.
:Rfactory to navigate to the
If the current line contains a FactoryBot trait reference, you will be taken to the line that defines the trait within the parent factory.
There are variants to the
:Rfactory command to open the factories file in
your preferred split or tab configuration.
Rfactory expects the factory file or files to be in one of the standard
factory file locations as specified in the Defining Factories section of the
FactoryBot docs, specifically:
test/factories.rb spec/factories.rb test/factories/*.rb spec/factories/*.rb
The plugin does its best to support each of the FactoryBot methods, specifically:
In addition, for each of the above methods,
Rfactory also supports the
<method>_list variants (e.g.