diff options
author | Aaron Patterson <aaron.patterson@gmail.com> | 2010-08-23 14:44:10 -0700 |
---|---|---|
committer | Aaron Patterson <aaron.patterson@gmail.com> | 2010-08-23 14:44:10 -0700 |
commit | c151df07acc06b06179c2dc6205db029ff9ce001 (patch) | |
tree | 24717fd5502ac9fa2634df8694e04aa800d3e287 /spec/arel/visitors | |
parent | 3bc3b145aedea216eb84e213bac1017c6090d42b (diff) | |
download | rails-c151df07acc06b06179c2dc6205db029ff9ce001.tar.gz rails-c151df07acc06b06179c2dc6205db029ff9ce001.tar.bz2 rails-c151df07acc06b06179c2dc6205db029ff9ce001.zip |
AND nodes are supported
Diffstat (limited to 'spec/arel/visitors')
-rw-r--r-- | spec/arel/visitors/to_sql_spec.rb | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/spec/arel/visitors/to_sql_spec.rb b/spec/arel/visitors/to_sql_spec.rb index b70c392630..9807c89b3a 100644 --- a/spec/arel/visitors/to_sql_spec.rb +++ b/spec/arel/visitors/to_sql_spec.rb @@ -8,6 +8,13 @@ module Arel @attr = Table.new(:users)[:id] end + it "should visit_Arel_Nodes_And" do + node = Nodes::And.new @attr.eq(10), @attr.eq(11) + @visitor.accept(node).should be_like %{ + "users"."id" = 10 AND "users"."id" = 11 + } + end + it "should visit_Arel_Nodes_Or" do node = Nodes::Or.new @attr.eq(10), @attr.eq(11) @visitor.accept(node).should be_like %{ |