Skip to content

Instantly share code, notes, and snippets.

@amiel
Created April 25, 2012 04:35
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 1 You must be signed in to fork a gist
  • Save amiel/2486396 to your computer and use it in GitHub Desktop.
Save amiel/2486396 to your computer and use it in GitHub Desktop.
A sample migration spec
# spec/migrations/add_email_at_utc_hour_to_users_spec.rb
require 'spec_helper'
require Dir[Rails.root.join('db/migrate/*_add_email_at_utc_hour_to_users.rb')].first
describe AddEmailAtUtcHourToUsers do
let(:migration) { AddEmailAtUtcHourToUsers.new }
describe '#up' do
before { migration.up; User.reset_column_information }
it 'adds the email_at_utc_hour column' do
User.columns_hash.should have_key('email_at_utc_hour')
end
end
nend
@stephen-puiszis
Copy link

You have an extra n on line 16

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment