DEV Community

n350071πŸ‡―πŸ‡΅
n350071πŸ‡―πŸ‡΅

Posted on

2

Search how to use the Factorybot form the project files

πŸ€” Situation

There is this Factory. You want to make sure how to use the variable 'world' in this project.

factory :hello, class: Hello do
  transient do
    world { 'world' }
  end

πŸ‘ Search by Regex

Because the factory name is :hello, it should be

  • create(:hello, blah blah blah, world )
  • build(:hello, blah blah blah, world )

Then, the search word is should be like this.

(create\(:hello.*world)
(build\(:hello.*world)

πŸ”— Parent Note

Top comments (0)

Billboard image

Create up to 10 Postgres Databases on Neon's free plan.

If you're starting a new project, Neon has got your databases covered. No credit cards. No trials. No getting in your way.

Try Neon for Free β†’