2009-01-21 - Today’s Ruby/Rails Reading
Getting Started with Instant Rails on Windows - 17 minutes
For some reason the ruby advent calendar posts ended up in my RSS feed in mid-January. Here are my summaries of the ones I have read so far:
The humble splat * - gathers method parameters into an array and pulls all the elements out of an array depending on the context (the elements have to have somewhere to go). Useful for turning an array into hash and turning an array into method arguments
Thinking out of the Box with Enumerable#inject
Examples of various ways of using inject. The examples are not that clearly explained so it isn’t really a beginner level tutorial. I can’t really recommend this one. This mentioned one is better. I also don’t think clever inject techniques do anything good for code clarity.
Read your specs, use readable output formatters rather than dots, run tests before coding to verify failure and to proofread.
Spec Smells: code - description mismatch, ambiguous subject, lengthy setup (you may be testing too much or you need to move setup into a factory such as Machinist or your application may need simplifying), Contexts named after methods (instead of objects), Stubbing system classes, Examples named after methods, Examples with long names or vague names, specs for private methods.
Very quick overview of cucumber. Installation and one example of specing an admin dashboard.
Deploying Ruby Apps with Passenger
Very quick recipe for a phusion passenger site setup (the example is a sinatra app).
This entry was posted on Wednesday, January 21st, 2009 at 3:50 pm and is filed under Ruby on Rails. You can follow any responses to this entry through the RSS 2.0 feed. You can leave a response, or trackback from your own site.


