Sha256: cfb3633c32329308b2cf4128091d65d6cc7bad8cd9b9f85717fb8c7d0955ca71

Contents?: true

Size: 367 Bytes

Versions: 1

Compression:

Stored size: 367 Bytes

Contents

FactoryBot.define do
  factory :<%= name %>, class: <%= record.class %> do
  <%- columns.each do |column| -%>
    <%- quote = FactoryBotGenerator::Base::QUOTE_AROUND_VALUE_TYPES.include?(record.class.columns_hash[column].type) -%>
    <%= "#{ "%-#{indent}s" % column } { #{ "'" if quote }#{ record.public_send(column) }#{ "'" if quote } }" %>
  <%- end -%>
  end
end

Version data entries

1 entries across 1 versions & 1 rubygems

Version Path
factory_bot_generator-0.3.1 lib/factory_bot_generator.erb