diff options
author | Bryan Helmkamp <bryan@brynary.com> | 2009-05-17 17:53:40 -0400 |
---|---|---|
committer | Bryan Helmkamp <bryan@brynary.com> | 2009-05-17 17:53:40 -0400 |
commit | d2988420fc6dd91ca751d96ed648fd1ed52ce342 (patch) | |
tree | e817b2dcc2b8d018181fd676feb1648786d23de3 /spec/arel/engines/sql/unit/relations/insert_spec.rb | |
parent | 7fc820501ce7b997da43c47ec189aaa0d40645e1 (diff) | |
download | rails-d2988420fc6dd91ca751d96ed648fd1ed52ce342.tar.gz rails-d2988420fc6dd91ca751d96ed648fd1ed52ce342.tar.bz2 rails-d2988420fc6dd91ca751d96ed648fd1ed52ce342.zip |
Added PostgreSQL to build
Diffstat (limited to 'spec/arel/engines/sql/unit/relations/insert_spec.rb')
-rw-r--r-- | spec/arel/engines/sql/unit/relations/insert_spec.rb | 20 |
1 files changed, 18 insertions, 2 deletions
diff --git a/spec/arel/engines/sql/unit/relations/insert_spec.rb b/spec/arel/engines/sql/unit/relations/insert_spec.rb index dd1995cced..29a5e0bf42 100644 --- a/spec/arel/engines/sql/unit/relations/insert_spec.rb +++ b/spec/arel/engines/sql/unit/relations/insert_spec.rb @@ -30,13 +30,21 @@ module Arel }) end - adapter_is_not :mysql do + adapter_is :sqlite3 do @insertion.to_sql.should be_like(%Q{ INSERT INTO "users" ("id", "name") VALUES (1, 'nick') }) end + + adapter_is :postgresql do + @insertion.to_sql.should be_like(%Q{ + INSERT + INTO "users" + ("id", "name") VALUES (1, E'nick') + }) + end end describe 'when given values whose types correspond to the types of the attributes' do @@ -53,13 +61,21 @@ module Arel }) end - adapter_is_not :mysql do + adapter_is :sqlite3 do @insertion.to_sql.should be_like(%Q{ INSERT INTO "users" ("name") VALUES ('nick') }) end + + adapter_is :postgresql do + @insertion.to_sql.should be_like(%Q{ + INSERT + INTO "users" + ("name") VALUES (E'nick') + }) + end end end |