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 --- spec/arel/engines/sql/unit/relations/group_spec.rb | 20 ++++++++++++++++++-- 1 file changed, 18 insertions(+), 2 deletions(-) (limited to 'spec/arel/engines/sql/unit/relations/group_spec.rb') diff --git a/spec/arel/engines/sql/unit/relations/group_spec.rb b/spec/arel/engines/sql/unit/relations/group_spec.rb index 703dc35be5..72a9f4e99e 100644 --- a/spec/arel/engines/sql/unit/relations/group_spec.rb +++ b/spec/arel/engines/sql/unit/relations/group_spec.rb @@ -20,7 +20,15 @@ module Arel }) end - adapter_is_not :mysql do + adapter_is :oracle do + sql.should be_like(%Q{ + SELECT "USERS"."ID", "USERS"."NAME" + FROM "USERS" + GROUP BY "USERS"."ID" + }) + end + + adapter_is_not :mysql, :oracle do sql.should be_like(%Q{ SELECT "users"."id", "users"."name" FROM "users" @@ -42,7 +50,15 @@ module Arel }) end - adapter_is_not :mysql do + adapter_is :oracle do + sql.should be_like(%Q{ + SELECT "USERS"."ID", "USERS"."NAME" + FROM "USERS" + GROUP BY asdf + }) + end + + adapter_is_not :mysql, :oracle do sql.should be_like(%Q{ SELECT "users"."id", "users"."name" FROM "users" -- cgit v1.2.3