Permalink
Browse files

[dm-migrations] Updated specs to use new quoting style for MysqlAdapter

  • Loading branch information...
dkubb committed Sep 10, 2009
1 parent 2cb2aab commit 1163777e2b676bbfb7dbb79efe30e3a4372dfb04
Showing with 2 additions and 2 deletions.
  1. +2 −2 spec/integration/sql_spec.rb
@@ -49,7 +49,7 @@ def repository(*args)
end
it "should quote the table name for the adapter" do
- @creator.quoted_table_name.should == '"people"'
+ @creator.quoted_table_name.should == (adapter == :mysql ? '`people`' : '"people"')
end
it "should allow for custom options" do
@@ -66,7 +66,7 @@ def repository(*args)
when :mysql
it "should create an InnoDB database for MySQL" do
#can't get an exact == comparison here because character set and collation may differ per connection
- @creator.to_sql.should match(/^CREATE TABLE "people" \("id" SERIAL PRIMARY KEY, "name" VARCHAR\(50\) NOT NULL, "long_string" VARCHAR\(200\)\) ENGINE = InnoDB CHARACTER SET \w+ COLLATE \w+\z/)
+ @creator.to_sql.should match(/^CREATE TABLE `people` \(`id` SERIAL PRIMARY KEY, `name` VARCHAR\(50\) NOT NULL, `long_string` VARCHAR\(200\)\) ENGINE = InnoDB CHARACTER SET \w+ COLLATE \w+\z/)
end
when :postgres
it "should output a CREATE TABLE statement when sent #to_sql" do

0 comments on commit 1163777

Please sign in to comment.