StackOverflow Questions for Tag: factory-bot

ERunner
ERunner

Reputation: 1

FactoryBot instance variable is re-instantiated after setup in Minitest within CI environment

Score: -1

Views: 96

Answers: 1

Read More
thornomad
thornomad

Reputation: 6797

Seeded database key values conflicting with factory bot create/build

Score: 4

Views: 1274

Answers: 2

Read More
user1185081
user1185081

Reputation: 2118

How to instanciate a parent-child relation with Factory-Bot on Ruby on Rails5.2?

Score: 0

Views: 176

Answers: 1

Read More
Jeremy Thomas
Jeremy Thomas

Reputation: 6694

Factory Bot: Association creates circular logic

Score: 2

Views: 111

Answers: 1

Read More
nakakapagpabagabag
nakakapagpabagabag

Reputation: 489

Update associated object within a FactoryBot trait

Score: 3

Views: 1484

Answers: 3

Read More
Anas Shahid
Anas Shahid

Reputation: 3

For an ActiveRecord model with overridden `New` method, how to provide custom test subject with parameters using FactoryGirl in Rails shoulda matchers

Score: -1

Views: 42

Answers: 1

Read More
Meltemi
Meltemi

Reputation: 38359

Factory_girl: one attribute's definition is dependent upon another one

Score: 1

Views: 157

Answers: 3

Read More
daveasdf
daveasdf

Reputation: 135

How to send in a random variable from Rails Rspec test to application controller? (devise, factorybot, capybara)

Score: 0

Views: 66

Answers: 1

Read More
jim
jim

Reputation: 1053

Call trait from another trait with params in factory_bot

Score: 27

Views: 11460

Answers: 2

Read More
daveasdf
daveasdf

Reputation: 135

FactoryGirl Rspec Rails user has a different name

Score: 0

Views: 38

Answers: 1

Read More
user1185081
user1185081

Reputation: 2118

How to test child creation in hierarchical parent-child relationship with Rspec / Rails 5.2?

Score: 0

Views: 338

Answers: 2

Read More
Diego Fernandez
Diego Fernandez

Reputation: 11

Rails 5 Rspec Trait with associates

Score: 0

Views: 103

Answers: 1

Read More
Eric Norcross
Eric Norcross

Reputation: 4306

Weird error when testing `has_many` association with a conditional scope with Rspec & FactoryBot

Score: 0

Views: 79

Answers: 1

Read More
vivipoit
vivipoit

Reputation: 219

Factory Bot - Is there a way to make an attribute value conditional based on overrides?

Score: 1

Views: 922

Answers: 1

Read More
Drew
Drew

Reputation: 15438

Unidirectional Relation failing with Factory Girl `can't write unknown attribute`

Score: 1

Views: 238

Answers: 2

Read More
53c
53c

Reputation: 453

How to override model's default attributes using FactoryBot?

Score: -1

Views: 474

Answers: 1

Read More
Son of the Wai-Pan
Son of the Wai-Pan

Reputation: 13221

What's the difference between the build and create methods in FactoryGirl?

Score: 117

Views: 67491

Answers: 3

Read More
Jared Beck
Jared Beck

Reputation: 17538

How to use factory_bot to build objects that lack accessor methods?

Score: 2

Views: 149

Answers: 1

Read More
ngcable
ngcable

Reputation: 33

factory_bot does not support initialize_with keyword arguments

Score: 0

Views: 364

Answers: 1

Read More

Rails 7 Custom validation breaks rspec model validations tests

Score: 0

Views: 367

Answers: 1

Read More
PreviousPage 3Next