diff options
author | Raimonds Simanovskis <raimonds.simanovskis@gmail.com> | 2010-02-10 19:50:59 +0200 |
---|---|---|
committer | Raimonds Simanovskis <raimonds.simanovskis@gmail.com> | 2010-03-01 12:02:10 +0200 |
commit | 20a10e5302ce8f912d27c57702b542a019c7f9f9 (patch) | |
tree | 38de3309520244ba6fda99b8d47525852e926491 /spec/arel/engines/sql/unit/relations/insert_spec.rb | |
parent | 98a87e181aed8131797e55db2ca957bc515cdaca (diff) | |
download | rails-20a10e5302ce8f912d27c57702b542a019c7f9f9.tar.gz rails-20a10e5302ce8f912d27c57702b542a019c7f9f9.tar.bz2 rails-20a10e5302ce8f912d27c57702b542a019c7f9f9.zip |
changes for Oracle support - OracleCompiler and corresponding tests with Oracle syntax
Diffstat (limited to 'spec/arel/engines/sql/unit/relations/insert_spec.rb')
-rw-r--r-- | spec/arel/engines/sql/unit/relations/insert_spec.rb | 25 |
1 files changed, 25 insertions, 0 deletions
diff --git a/spec/arel/engines/sql/unit/relations/insert_spec.rb b/spec/arel/engines/sql/unit/relations/insert_spec.rb index 69c5bb052c..4b412093e4 100644 --- a/spec/arel/engines/sql/unit/relations/insert_spec.rb +++ b/spec/arel/engines/sql/unit/relations/insert_spec.rb @@ -46,6 +46,14 @@ module Arel RETURNING "id" }) end + + adapter_is :oracle do + @insertion.to_sql.should be_like(%Q{ + INSERT + INTO "USERS" + ("ID", "NAME") VALUES (1, 'nick') + }) + end end describe 'when given values whose types correspond to the types of the attributes' do @@ -78,6 +86,14 @@ module Arel RETURNING "id" }) end + + adapter_is :oracle do + @insertion.to_sql.should be_like(%Q{ + INSERT + INTO "USERS" + ("NAME") VALUES ('nick') + }) + end end end @@ -111,6 +127,15 @@ module Arel RETURNING "id" }) end + + adapter_is :oracle do + @insertion.to_sql.should be_like(%Q{ + INSERT + INTO "USERS" + ("ID") VALUES (1) + }) + end + end end end |