Wrote a quick rake task to check if Rails assets need to be pre-compiled (which I like to do before deployment) - if there's interest, I will try submitting a pull request to add this to Rails
subelsky — 20 posts
An example of using RSpec shared examples to test the seven common RESTful actions in Rails controllers.
Nick Gauthier on how to write good BDD tests with Capybara and Domino (Free Screencast) rubystudyhall.com
Nick guest-starred on Ruby Study Hall, reviewing a set of Capybara tests I had written using his Domino gem. Some good tips on how to keep tests clean and readable and focused on the user's perspective.
Wrote up a quick demonstration of how I combine more high-level Ruby integration tests with fewer unit tests to completely test a codebase without the suite becoming bloated and slow.
simple_resque abstracts a pattern that's become very common in my recent projects. Unlike the usual Resque setup, I never put the workers in the same codebase as the web app, which required some hacks. This gem provides a thin wrapper over Resque's push method to mimick the way
Resque.enqueueworks, but doesn't require you to use a class constant.
Simple rake task that chops up audio files for Apple's HTTP streaming protocol and uploads 'em to S3, so you can stream the audio to iOS devices (and also Safari) without getting your app rejected.
A lot of Rails blog posts recommend that you only turn SSL on in production and don't try to use it in the test or development environments. I explain why this is a big mistake and and present all the code I used to get SSL working with Rails 3, Capybara, and Devise.
Quick tip on how to setup Rails caching to use memcached conditionally, when the daemon is running.
random_data v1.3 released random-data.rubyforge.org
random_data v1.3 is a gem that provides a variety of methods for generating realistic seed data for Ruby applications, including names, mailing addresses, dates, phone numbers, e-mail addresses, and text. This release includes support for generating random sentences from a simple grammar and generating random bit vectors.
Quick tip describing how to use Ruby's autoload facility to defer configuration of certain parts of a Rails app.