Skip to content

mukarramali/dynamize_factories

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

12 Commits
 
 
 
 
 
 
 
 

Repository files navigation

DynamizeFactories

Change static values in factories to dynamic by enclosing them in curly braces

Problem

Since factory_bot 4.11, static attributes have been deprecated. Instead they should be passed in blocks.

So instead of

factory :robot do
  name "Ralph"
end

New way to use attribute-value pairs is:

factory :robot do
  name {"Ralph"}
end

Further: https://robots.thoughtbot.com/deprecating-static-attributes-in-factory_bot-4-11

Usage

./run <File/Directory>

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages