Permalink
Browse files

Add specs for #change_column under MySQL

  • Loading branch information...
1 parent 9eb1f5b commit 8611e665aae00222b6c0ea4c6ef9dc48c19f3def @dkubb dkubb committed Apr 7, 2012
Showing with 10 additions and 4 deletions.
  1. +10 −4 spec/integration/sql_spec.rb
@@ -137,16 +137,22 @@
@migration.should respond_to(:modify_table)
end
- case DataMapper::Spec.adapter_name.to_sym
- when :postgres
+ describe '#change_column' do
before do
@modifier = DataMapper::Migration::TableModifier.new(@adapter, :people) do
change_column :name, 'VARCHAR(200)'
end
end
- it "should alter the column" do
- @modifier.to_sql.should == %q{ALTER TABLE "people" ALTER COLUMN "name" VARCHAR(200)}
+ case DataMapper::Spec.adapter_name.to_sym
+ when :mysql
+ it 'alters the column' do
+ @modifier.to_sql.should == %q{ALTER TABLE `people` MODIFY COLUMN `name` VARCHAR(200)}
+ end
+ when :postgres
+ it 'alters the column' do
+ @modifier.to_sql.should == %q{ALTER TABLE "people" ALTER COLUMN "name" VARCHAR(200)}
+ end
end
end

0 comments on commit 8611e66

Please sign in to comment.