You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Including FactoryBot::Syntax::Methods gives you access to build, build_list, create, create_list, and attributes_for directly in your tests, such as:
deftest_renders_itselfuser=create(:user,articles: build_list(:article,2))# not FactoryBot.create or FactoryBot.build_listwriter=build(:writer)# not FactoryBot.builduser.render(writer)assertwriter.to_s == "User with two articles"end