more on testing in ruby on rails
Ben Griffiths has an interesting entry: "A test by any other way":http://www.reevoo.com/blogs/bengriffiths/2005/06/24/a-test-by-any-other-name/. He starts off showing how to cut down on duplication in your tests. What really got me was his rake task to generate docs based on his test method naming scheme. Here's a sample:
security_controller should: * redirect to page stored in session on successful login * store user object in session on successful login * redirect to page stored in session after signup * store user object in session after signup * reject signup when passwords do not match * reject signup when login too short * report both errors if passwords dont match and username too short * not store user in session if password not correct on signup * remain on login page if password not correct on signup * remove user from session on log out
He's generating contracts for his objects from the source code. I think I'll adopt this style of test naming immediately.
related
- 2010 Aug 03 Protocol Buffers with Riak for Node.js
- 2010 Jul 13 In-Process Node.js Queues
- 2010 Jul 07 Geek Talk Interview
- 2010 Jun 28 Tee and Child Processes
- 2010 Jun 23 You can let go now
- 2010 May 17 Railsconf: Building APIs
- 2010 May 10 Nori: Node.js Riak wrapper
- 2010 May 10 No, I did not create a mobile phone framework too
- 2010 May 04 Escaping your test suite with your life
- 2010 Apr 05 Will the iPad kill comic books?

