Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse files

Add specs for #change_column under MySQL

  • Loading branch information...
commit 8611e665aae00222b6c0ea4c6ef9dc48c19f3def 1 parent 9eb1f5b
@dkubb dkubb authored
Showing with 10 additions and 4 deletions.
  1. +10 −4 spec/integration/sql_spec.rb
View
14 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
Please sign in to comment.
Something went wrong with that request. Please try again.