17 Dec '13, 3pm

post(:create, :book => { :title => "Love Hina" }) assert_not_nil Book.find_by_title("Love Hina") 我才发现这文档…

Superclass for ActionController functional tests. Functional tests allow you to test a single controller action per test method. This should not be confused with integration tests (see ActionDispatch::IntegrationTest ), which are more like “stories” that can involve multiple controllers and multiple actions (i.e. multiple different HTTP requests). Basic example Functional tests are written as follows: First, one uses the get , post , put , delete or head method to simulate an HTTP request. Then, one asserts whether the current state is as expected. “State” can be anything: the controller's HTTP response, the database contents, etc. For example: class BooksControllerTest < ActionController :: TestCase def test_create # Simulate a POST response with the given HTTP parameters. post (:create , :book => { :title => "Love Hina" }) # Assert that the controller tried to redirect u...

Full article: http://api.rubyonrails.org/v3.2.16/classes/ActionControll...

Tweets

'Book' Christmas tree is easy, eco-friendly, and free

'Book' Christmas tree is easy, eco-friendly, an...

treehugger.com 17 Dec '13, 11am

Every year I despair a little bit about the christmas tree issue . There's something disturbing about growing a tree just ...

My Christmas book list for endurance nerds: @Da...

runnersworld.com 18 Dec '13, 12am

Matt Fitzgerald wears a lot of hats -- nutritionist, coach, journalist, stunningly prolific book author, etc. But from my ...

ToTT Launches New Brunch Recipe Book and E-Store

camemberu.com 17 Dec '13, 7am

Photo: Me with Ian Wright, my travel hero and host for Discovery TLC. What's "Camemberu"? It's the way the Japanese pronou...

Doug Hanzel wins senior title at Dixie Amateur. Story via @GolfweekRon:

Doug Hanzel wins senior title at Dixie Amateur....

golfweek.com 16 Dec '13, 2am

Doug Hanzel won the senior-division title of the 83rd Dixie Amateur at Heron Bay Golf Club in Coral Springs, Fla., posting...

Do you know what the world's first webcam was f...

en.ilovecoffee.jp 17 Dec '13, 4pm

I Love Coffee is full of infographics, facts, quizzes, and other fun visual stuff about coffee written by Ryoko Iwata: a J...

Gift ideas for foodies

Gift ideas for foodies

soshiok.com 17 Dec '13, 2am

Jeremy Nguee Chef and owner of catering service Preparazzi and Rakusaba, a pop-up ramen bar at The U Factory in Gillman Ba...

Badminton: #Malaysia's Lee Chong Wei close to record #Superseries Finals title

Badminton: #Malaysia's Lee Chong Wei close to r...

straitstimes.com 14 Dec '13, 11pm

Malaysia's Lee Chong Wei celebrates after defeating Denmark's Jan O Jorgensen during their men's singles semifinal match o...

Love to Blog? Love Luxury? Become a Pursuitist....

pursuitist.com 15 Dec '13, 8pm

We are currently looking for additional guest writers, bloggers and interns to contribute to Pursuitist . Must have previo...

Best little black handbag: Audrey Hepburn/Holly Golightly Book Clutch. Fast shipping 4 Xmas! #potti…

Best little black handbag: Audrey Hepburn/Holly...

etsy.com 13 Dec '13, 3pm

Impress at your next event with a “Fifth Avenue, 5 A.M.” book clutch purse with Audrey Hepburn on the cover. This book pur...

Miguel Angel Jimenez wins fourth Hong Kong Open...

golf.com 08 Dec '13, 2pm

HONG KONG (AP) --- Miguel Angel Jimenez won the Hong Kong Open for the fourth time Sunday after winning a three-way playof...