Articles on Testing

Jonah Williams

Jonah Williams

Generating documentation from specs

On one of our rails projects I am creating an api to allow mobile clients to access a web service. I need to provide documentation of this API to the developers of several different clients during its development. Normally I would prefer to let my API tests act as documentation of the expected API behavior

Jonah Williams

Jonah Williams

Running Xcode 4 unit tests from the command line

Command line builds for Xcode 4 projects are a good first step but I really want to get my project’s tests running on a continuous integration server again. Since “test” isn’t a valid build action to pass to xcodebuild I’ve been looking for a configuration which would allow me to run tests in a headless

Michael Wynholds

Michael Wynholds

Raking and Testing with EventMachine

I have been getting more and more interested in high-performance Ruby apps, and in EventMachine in particular. First of all, super props to Aman Gupta for EM, and to some other Ruby devs out there who have been writing libraries and drivers on top if it, such as Ilya Grigorik, and Carbon Five’s own Mike

Christian Bradley

Christian Bradley

Speedy Test Iterations for Rails 3 with Spork and Guard

Overview TDD is fun, right? Rails enthusiasts and agile evangelists alike agree. Waiting for your tests to run, however, makes for a frustrating experience. When the time between test iterations is magnified by bloated tests it can be hard to maintain a purist’s test-driven approach. After looking into autotest, parallel testing, and in-memory databases, I

Jared Carroll

Jared Carroll

TDD your way to a richer domain model

A well established and accepted design principle in the Rails community is “skinny controller, fat model”. This involves placing an application’s domain logic in models and keeping the request handling controllers simple and sparse (i.e. “skinny”). The result is a more modularized, reusable, rich domain model. The following is an example of using TDD to

Andy Peterson

Andy Peterson

Ew… you got CSS in my Javascript

The other weekend I test drove a little Javascript library to output CSS style rules from within Javascript. I took the most obvious Javascript-literal approach to get the most out of Javascript support in editors. I called it Csster (“sister”), and it looks like: Csster.style({ h1: { fontSize: 18, color: ‘chartreuse’ } }); All it

Jared Carroll

Jared Carroll

RSpec best practices

Rspec is a great tool in the behavior driven design process of writing human readable specifications that direct and validate the development of your application. We’ve found the following practices helpful in writing elegant and maintainable specifications. First #describe what you are doing … Begin by using a #describe for each of the methods you

Jonah Williams

Jonah Williams

Continuous integration for iPhone projects in TeamCity

Carbon Five has been using TeamCity as our continuous integration server for most of our recent projects, including our iPhone work. Out continuous integration environment monitors the git repository used by each project, runs the project’s tests each time a change is pushed to the repository, and can automatically produce an ad-hoc build of an

Dark colors
Jonah Williams

Jonah Williams

Deploying to Heroku from TeamCity

Previously I discussed our TeamCity configuration using RVM and mentioned that we often use git to deploy projects. Today I’ll share an example of how a TeamCity build agent can trigger deployments of a application hosted on Heroku and some of the challenges I found.

Jonah Williams

Jonah Williams

Using RVM on TeamCity build agents

We have been using TeamCity to manage the continuous integration, testing, and deployment of many of our recent projects. We have also been using RVM on all of our recent Rails projects to allow us to install multiple ruby versions and create isolated gemsets for each project. RVM proved to be particularly useful on our