Skip to content

Instantly share code, notes, and snippets.

Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save adrianpike/2698784 to your computer and use it in GitHub Desktop.
Save adrianpike/2698784 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
end
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment