Sha256: f6d03bcc690e4e331f4427330fe33566d92cde1b5f90a296bd2a972fb6a8e597
Contents?: true
Size: 647 Bytes
Versions: 8
Compression:
Stored size: 647 Bytes
Contents
module FactoryBotRails module Generators class RSpecGenerator def initialize(generators) @generators = generators end def run @generators.fixture_replacement( fixture_replacement_setting, dir: factory_bot_directory, ) end private def fixture_replacement_setting @generators.options[:rails][:fixture_replacement] || :factory_bot end def factory_bot_directory factory_bot_options.fetch(:dir, "spec/factories") end def factory_bot_options @generators.options.fetch(:factory_bot, {}) end end end end
Version data entries
8 entries across 8 versions & 1 rubygems