Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Browse files

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

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