Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #In test file
- setup do
- load_scenario("bookshop_a")
- end
- test "Franks has 5 books" do
- assert_equal 5, @frank.books.count
- end
- #In test helper or some other such solution
- def load_scenario(scenario_name)
- create(:bookshop_owner, name:"Frank")
- create(:bookshop, name: "A lotta books")
- create_list(5, :books)
- end
Add Comment
Please, Sign In to add comment