Permalink
Browse files

Merge pull request #112 from benedikt/master

Adds visit_Arel_Nodes_InfixOperation to Arel::Visitors::DepthFirst
  • Loading branch information...
2 parents 660768f + c50b406 commit b45466757424b98e1fe9699042d23550fd5b8751 @tenderlove tenderlove committed Mar 22, 2012
Showing with 7 additions and 0 deletions.
  1. +1 −0 lib/arel/visitors/depth_first.rb
  2. +6 −0 test/visitors/test_depth_first.rb
@@ -70,6 +70,7 @@ def binary o
alias :visit_Arel_Nodes_GreaterThan :binary
alias :visit_Arel_Nodes_GreaterThanOrEqual :binary
alias :visit_Arel_Nodes_In :binary
+ alias :visit_Arel_Nodes_InfixOperation :binary
alias :visit_Arel_Nodes_JoinSource :binary
alias :visit_Arel_Nodes_InnerJoin :binary
alias :visit_Arel_Nodes_LessThan :binary
@@ -114,6 +114,12 @@ def test_outer_join
end
end
+ def test_Arel_Nodes_InfixOperation
+ binary = Arel::Nodes::InfixOperation.new(:o, :a, :b)
+ @visitor.accept binary
+ assert_equal [:a, :b, binary], @collector.calls
+ end
+
# N-ary
[
Arel::Nodes::And,

0 comments on commit b454667

Please sign in to comment.