Module: Synthra::FactoryBotIntegration::DSL
- Defined in:
- lib/synthra/factory_bot_integration.rb
Overview
DSL methods available inside factory definition blocks
Instance Method Summary collapse
-
#trait(name) { ... } ⇒ Object
Define a trait for the factory.
Instance Method Details
#trait(name) { ... } ⇒ Object
Define a trait for the factory
133 134 135 136 137 |
# File 'lib/synthra/factory_bot_integration.rb', line 133 def trait(name, &block) # Store the trait for later use @current_factory_traits ||= {} @current_factory_traits[name] = block end |