Tag Archives: rails

Configuring database_cleaner with Rails, RSpec, Capybara, and Selenium

How I avoid finding myself in database bizarro world while testing Rails apps. Continue reading

Posted in Rails, Ruby | Tagged , , , , , | 18 Comments

Creating Cowsays.com Part 2: Unit Tests and Cow Files

Part two in my “live”-style screencast series is now available! Watch me code up a small web app from scratch using test-driven development. In this hour-long episode, I switch from integration testing to unit testing in order to drive out … Continue reading

Posted in Announcements, Screencasts | Tagged , , , , , , | Leave a comment

New maintainer needed for NullDB

NullDB, for those who don’t know, is a null backend for ActiveRecord. Unlike RSpec’s stub_object, rather than raise an exception on DB access, will NullDB DB interactions simply become no-ops. This is handy for things like testing after_save hooks in … Continue reading

Posted in Announcements | Tagged , , , , | Leave a comment

Early access beta of “Objects on Rails” Now Available

UPDATE: Objects on Rails is now complete and freely available online. Often, at conferences and users group meetings, I find myself discussing the intersection of Ruby on Rails, Object-Oriented development, and Test-Driven Development, and I’ll mention something like “I prefer to develop my … Continue reading

Posted in Announcements, Books | Tagged , , , , | 27 Comments

DRYing up your validations using DB reflection

Avoiding silent truncation of your model fields requires putting length validations on them. But this can introduce duplication of knowledge. In this post I demonstrate how to pull limit information directly from the DB into your model validations. Continue reading

Posted in Rails | Tagged , , , | 26 Comments

View Sandboxes for Rails

Designing HTML views is an iterative, interactive process by nature. And anything that slows down the iterations, slows down development. I was working on a form recently where the steps to show it went something like this: Go to the … Continue reading

Posted in Howto, Rails | Tagged , | 14 Comments

RailsConf, BohConf, DCRUG Video

DCRUG First off, I had a great time at DCRUG last night. I enjoyed getting a peek at Jeff Casimir‘s “pre-alpha” presentation on Rails views. And Joel Strait‘s live demo of BEATS was very cool. I did something a little … Continue reading

Posted in Conferences | Tagged , , , | Leave a comment

Linkdump #7

Hacker Chat: Pinboard Creator Maciej Ceglowski Talks About Why Boring Architecture is Good, and More Wise words. tags: development I think many developers (myself included) are easily seduced by new technology and are willing to burn a lot of time … Continue reading

Posted in Links | Tagged , , , , , , , , , , , | Leave a comment

Getting Started with Erector in Rails 3

A quick guide to getting up and running with the Erector templating library. EDIT: Here’s the fork and branch I used to get it working.

Posted in Screencasts | Tagged , , , , , | 1 Comment

Linkdump #6

agile/db_branch – GitHub I’d been looking for a way to manage databases for multiple branches of an app, and this is one of the (many) suggestions. tags: development database ruby rails git Rails plugin to play nice with git branching … Continue reading

Posted in Links | Tagged , , , , , , , , , , , | Leave a comment