Skip to content

Instantly share code, notes, and snippets.

@justinweiss
Created April 18, 2010 21:42
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save justinweiss/370571 to your computer and use it in GitHub Desktop.
Save justinweiss/370571 to your computer and use it in GitHub Desktop.
def book_with_endorsements(endorsement_count)
book = Factory(:book)
endorsement_count.times do |n|
Factory(:endorsement, :book_id => book.id)
end
book
end
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment