Module: FactoryBot::Blueprint::RSpec::Driver
- Included in:
- RSpec::Core::ExampleGroup
- Defined in:
- lib/factory_bot/blueprint/rspec/driver.rb
Overview
Helper methods to integrate factory_bot-blueprint
with RSpec. This module is automatically extended to RSpec::Core::ExampleGroup
.
Instance Method Summary collapse
-
#letbp(name, items = []) ⇒ Letbp
This method expresses that the names given as arguments will be used in the let declaration for the set of objects to be created from the blueprint.
-
#letbp!(name, items = []) ⇒ Letbp
let!
version of #letbp. -
#letbp_it_be(name, items = [], **options) ⇒ Letbp
let_it_be
version of #letbp.
Instance Method Details
#letbp(name, items = []) ⇒ Letbp
This method expresses that the names given as arguments will be used in the let declaration for the set of objects to be created from the blueprint. Subsequent method calls specify specifically how to use FactoryBot to create the set of objects from the blueprint.
48 |
# File 'lib/factory_bot/blueprint/rspec/driver.rb', line 48 def letbp(name, items = []) = Letbp.new(self, :lazy, name, items) |