From c151df07acc06b06179c2dc6205db029ff9ce001 Mon Sep 17 00:00:00 2001 From: Aaron Patterson Date: Mon, 23 Aug 2010 14:44:10 -0700 Subject: AND nodes are supported --- spec/arel/nodes/equality_spec.rb | 11 +++++++++++ 1 file changed, 11 insertions(+) (limited to 'spec/arel/nodes') diff --git a/spec/arel/nodes/equality_spec.rb b/spec/arel/nodes/equality_spec.rb index b74af3a039..d91fa0df03 100644 --- a/spec/arel/nodes/equality_spec.rb +++ b/spec/arel/nodes/equality_spec.rb @@ -11,6 +11,17 @@ module Arel check node.right.should == right end end + + describe 'and' do + it 'makes and AND node' do + attr = Table.new(:users)[:id] + left = attr.eq(10) + right = attr.eq(11) + node = left.and right + check node.left.should == left + check node.right.should == right + end + end end end end -- cgit v1.2.3