I'm a programmer living in London. I am a member of the Ruby on Rails core team and currently I work as the Technical Director of Loco2. I write lots of open source code. If I'm not programming, I am probably rock climbing.
You can also browse all my past articles.
Almost a year ago, on a complete whim, I decided to try to hook up the headless browser PhantomJS with Ruby’s full-stack acceptance testing framework, Capybara.
Controllers in Rails are a problem. Actions sometimes become unmanageably long, and it’s often difficult to know how to test them when you need it most. At Railsberry in May, I presented a new way of writing controllers.
Rails controllers violate the Single Responsibility Principle. Each “action” has a different responsibility and should be contained in a separate object. Controllers are also hard to unit test, so we end up using slow “functional tests”.