Skip to content

Instantly share code, notes, and snippets.

@Ptico
Created April 1, 2014 18:25
Show Gist options
  • Save Ptico/9920026 to your computer and use it in GitHub Desktop.
Save Ptico/9920026 to your computer and use it in GitHub Desktop.
describe Sequelize::Migrator::Naming do
subject { described_class.new(name) }
describe 'Table create/delete' do
context 'create' do
let(:name) { 'create_user_profiles' }
end
context 'drop' do
let(:name) { 'drop_user_profiles' }
end
context 'remove' do
let(:name) { 'remove_user_profiles' }
end
end
describe 'Attribute create/delete' do
context 'add' do
let(:name) { 'add_user_profiles' }
end
context 'remove' do
let(:name) { 'remove_user_profiles' }
end
end
describe 'Table rename' do
let(:name) { 'rename_user_profiles' }
end
describe 'Attribute rename' do
let(:name) { 'rename_user_profiles_name_to_full_name' }
end
describe 'Index create/delete' do
context 'create' do
let(:name) { 'add_company_id_index_to_user_profiles' }
end
context 'delete' do
let(:name) { 'remove_company_id_index_from_user_profiles' }
end
end
describe 'Index change' do
let(:name) { 'change_company_id_index_in_user_profiles' }
end
describe 'Other changes' do
let(:name) { 'do_something_unusual' }
end
end
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment