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:
it"renders itself"douser=create(:user,articles: build_list(:article,2))# not FactoryBot.create or FactoryBot.build_listwriter=build(:writer)# not FactoryBot.builduser.render(writer)_(writer.to_s).must_equal"User with two articles"end