Blog posts by Duncan Stuart

  • Two things a junior developer should have on their CV

    We recently hired a couple of Ruby-on-Rails developers and we repeatedly came across some key things missing from candidate CVs. The following are critical for developers with little commercial experience, but probably apply across the board. Side projects It’s now a fact of life that in a the creative industries you have to be able […]

  • Timecop Gotcha

    Timecop is an extremely useful gem which allows you to simulate the passing of time in RSpec tests. We’re using it to test parts of Citrulu – for example, making sure we don’t send you multiple emails about the same thing. One of our tests has this shape: it “should do some stuff!” do # […]

  • KISSmetrics

    We’ve been using Google Analytics to analyse traffic to Citrulu so far, but adding custom events to track significant things (e.g. when a user first creates a real test file) is a massive faff. We’re currently working on integrating KISSmetrics via its JavaScript API and it looks pretty shiny so far: everything is centered around the user, and […]

  • Extending your testing strategy beyond go-live

    In a recent post on his software testing blog, Eric Jacobsen talks about responding to bugs which ‘escape’ into production: The point of Citrulu is to enable you to go one better: by allowing you to monitor your website in a test-driven way (rather than simply looking for exceptions or timeouts), it blurs the distinction between […]

  • RSpec FAIL – Testing Rails ‘destroy’

    I’m writing some specs for Citrulu and was scratching my head about this one for a while: When writing specs for Controllers, some http methods accept a hash as an input: it “assigns the requested test_file as @test_file” do controller.stub(:check_ownership!) get :edit, {:id => @test_file.to_param} assigns(:test_file).should eq(@test_file) end However with delete, this doesn’t work – the following […]

  • Caching with Varnish on Heroku (Rails)

    I had some trouble with a personal Rails project – trying to get it to use Varnish caching. I’ve collected my learnings on my personal blog.