aboutsummaryrefslogtreecommitdiffstats
path: root/test
diff options
context:
space:
mode:
authorErnie Miller <ernie@metautonomo.us>2011-02-11 12:08:32 -0500
committerErnie Miller <ernie@metautonomo.us>2011-02-11 12:08:32 -0500
commitdbc86c0f2c2fc3c8bacf35c67fb8e0967b0a8980 (patch)
tree75f482e0cc0fb5a10422b0ea576cde1181fb2338 /test
parent3d21dabaa6c214ab2f2941c063bd7de04fd95202 (diff)
downloadrails-dbc86c0f2c2fc3c8bacf35c67fb8e0967b0a8980.tar.gz
rails-dbc86c0f2c2fc3c8bacf35c67fb8e0967b0a8980.tar.bz2
rails-dbc86c0f2c2fc3c8bacf35c67fb8e0967b0a8980.zip
Fix #not to stop wrapping in a grouping node
Diffstat (limited to 'test')
-rw-r--r--test/nodes/test_not.rb11
1 files changed, 4 insertions, 7 deletions
diff --git a/test/nodes/test_not.rb b/test/nodes/test_not.rb
index d02a9bad74..c5bb0088c8 100644
--- a/test/nodes/test_not.rb
+++ b/test/nodes/test_not.rb
@@ -6,13 +6,10 @@ module Arel
describe '#not' do
it 'makes a NOT node' do
attr = Table.new(:users)[:id]
- left = attr.eq(10)
- right = attr.eq(11)
- node = left.or right
- node.expr.left.must_equal left
- node.expr.right.must_equal right
-
- node.or(right).not
+ expr = attr.eq(10)
+ node = expr.not
+ node.must_be_kind_of Not
+ node.expr.must_equal expr
end
end
end