Module: Synthra::FactoryBotIntegration::RSpec

Defined in:
lib/synthra/factory_bot_integration.rb

Overview

RSpec integration helpers

Instance Method Summary collapse

Instance Method Details

#fake_data_build(factory_name, *traits, **overrides) ⇒ Object Also known as: build_fake_data

Include Synthra factory support in RSpec

Examples:

In spec_helper.rb

require 'synthra/factory_bot_integration'
RSpec.configure do |config|
  config.include Synthra::FactoryBotIntegration::RSpec
end


150
151
152
# File 'lib/synthra/factory_bot_integration.rb', line 150

def fake_data_build(factory_name, *traits, **overrides)
  FactoryBotIntegration.build(factory_name, *traits, **overrides)
end