thoughtbot/shoulda-matchers — pull request #95 by dlupu (2012-04-11 06:46:22+00:00)
Title: #47 Ensure that the attribute's default value is set correctly. Examples...

...:

it { should have_a_default.for(:count) }
it { should have_a_default.of(0).for(:count) }
it { should default_to(0).on_the(:count).column }

For more information, read the comments :)