13 Jul '13, 1pm

Taming factory_girl list creation for faster tests.

July 13, 2013 derekprior ruby rails testing Taming Factory Girl List Creation There are times in your tests when you need to create multiple instances of the same type of object. FactoryGirl provides create_list for just these sorts of scenarios. It’s typically sufficient to create two records in these cases, but create_list leaves open the possibility that you could unintentionally create many more records. Consider, for example, testing a feature that pages in additional records on demand. You would likely want to use something like Kaminari to expose the paging functionality. We did just this on a recent project. scenario 'user can page in additional records' do posts = create_list(:post, Post.default_per_page + 1) click_button "Load More" expect(page).to have_content(posts.first.body) expect(page).to have_content(posts.last.body) end The trouble is that Kaminari defaul...

Full article: http://robots.thoughtbot.com/post/55339508524/taming-fact...

Tweets

Does anybody have a current list of all .GOV domains? The link in here doesn't work anymore:

Does anybody have a current list of all .GOV do...

domainshane.com 14 Jul '13, 10am

Whether your curious or actually need to find information, the US Government released this month a complete list (minus su...

[Blog Post] Spring cleanup for object creation in Rails #ruby #rails #rubyonrails #refactoring

[Blog Post] Spring cleanup for object creation ...

blog.8thcolor.com 17 Jul '13, 12pm

Now, everything about the creation of a Post instance is in one dedicated class method of the model. After all, it’s total...

@Normy616 or faster bid this

ebay.com.sg 14 Jul '13, 7pm

This Wired Controller Joypad for Sony PS3 White will optimize your gaming experience. Each hit, crash and explosion is mor...

@DSWShoeLovers Hi there! How does the wish list work to enter to win shoes? These shoes are in my wish list!

@DSWShoeLovers Hi there! How does the wish list...

dsw.com 14 Jul '13, 11pm

An American legend, the Ralph Lauren Collection brings quality and creation together. Keeping in trend with it's contrast ...