From 20a10e5302ce8f912d27c57702b542a019c7f9f9 Mon Sep 17 00:00:00 2001 From: Raimonds Simanovskis Date: Wed, 10 Feb 2010 19:50:59 +0200 Subject: changes for Oracle support - OracleCompiler and corresponding tests with Oracle syntax --- .../arel/engines/sql/unit/relations/insert_spec.rb | 25 ++++++++++++++++++++++ 1 file changed, 25 insertions(+) (limited to 'spec/arel/engines/sql/unit/relations/insert_spec.rb') 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 -- cgit v1.2.3