Permalink
Browse files

Merge pull request #121 from ernie/predications-on-grouping

Include Predications in Grouping
  • Loading branch information...
tenderlove committed May 23, 2012
2 parents 19c6eeb + c78227d commit 9ca3f4b6b99553e684714637949a7576cedea97a
Showing with 21 additions and 7 deletions.
  1. +1 −0 lib/arel/nodes.rb
  2. +7 −0 lib/arel/nodes/grouping.rb
  3. +0 −6 lib/arel/nodes/ordering.rb
  4. +0 −1 lib/arel/nodes/unary.rb
  5. +13 −0 test/nodes/test_grouping.rb
View
@@ -13,6 +13,7 @@
# unary
require 'arel/nodes/unary'
+require 'arel/nodes/grouping'
require 'arel/nodes/ascending'
require 'arel/nodes/descending'
require 'arel/nodes/unqualified_column'
@@ -0,0 +1,7 @@
+module Arel
+ module Nodes
+ class Grouping < Unary
+ include Arel::Predications
+ end
+ end
+end
@@ -1,6 +0,0 @@
-module Arel
- module Nodes
- class Ordering < Unary
- end
- end
-end
View
@@ -12,7 +12,6 @@ def initialize expr
%w{
Bin
Group
- Grouping
Having
Limit
Not
@@ -0,0 +1,13 @@
+require 'helper'
+
+module Arel
+ module Nodes
+ describe 'Grouping' do
+ it 'should create Equality nodes' do
+ grouping = Grouping.new('foo')
+ grouping.eq('foo').to_sql.must_be_like %q{('foo') = 'foo'}
+ end
+ end
+ end
+end
+

0 comments on commit 9ca3f4b

Please sign in to comment.