From cb6d13877c8d85bd7ba7f7286dfc8b5ae98a50b3 Mon Sep 17 00:00:00 2001 From: Aaron Patterson Date: Wed, 8 Sep 2010 15:29:22 -0700 Subject: adding having nodes --- spec/arel/table_spec.rb | 9 +++++++++ 1 file changed, 9 insertions(+) (limited to 'spec/arel') diff --git a/spec/arel/table_spec.rb b/spec/arel/table_spec.rb index e67c371577..46d9dbddf4 100644 --- a/spec/arel/table_spec.rb +++ b/spec/arel/table_spec.rb @@ -6,6 +6,15 @@ module Arel @relation = Table.new(:users) end + describe 'having' do + it 'adds a having clause' do + mgr = @relation.having @relation[:id].eq(10) + mgr.to_sql.should be_like %{ + SELECT FROM "users" HAVING "users"."id" = 10 + } + end + end + describe 'backwards compat' do describe 'joins' do it 'returns nil' do -- cgit v1.2.3