...tests break because they relied on the data you just changed. Getting to know FactoryBot Our favorite gem for test factories is FactoryBot. We used other gems in the past...

...PRO #158 Factories not Fixtures (revised) for an introduction to factories in general and FactoryBot in particular. Note This is an older video. FactoryGirl has since been renamed to FactoryBot...

Your MovieDB gained traction and is now a popular tool among cineasts. This comes with a downside: You noticed a...

Advanced cucumber features Learn about the following cucumber features: Doc Strings ("multiline strings") Tables Tags Before/after hooks Background Scenario outlines...

Best results in other decks

evilmartians.com

...unintentionally slow down test suites by creating unnecessary or excessive associated data (factory cascades). Understanding Factory-Induced Slowdowns Factories often create additional data (e.g., associated records) that can significantly slow...

...EventProf: Measures the time spent on specific events during tests to identify slow processes. FactoryProf: Tracks and analyzes factory usage to pinpoint inefficiencies such as: Overused factories being invoked repeatedly...

thoughtbot.github.io

Let's say you have two factories that share some attributes and traits: FactoryBot.define do factory :user do screen_name 'john' email 'foo@bar.de' trait :with_profile do age 18 description...

...re-use the shared fields by defining a trait outside the other factory definitions: FactoryBot.define do trait :person do email 'foo@bar.de' trait :with_profile do age 18 description 'lorem ipsum...

Search in all decks