Permalink
Browse files

Adds visit_Arel_Nodes_InfixOperation to Arel::Visitors::DepthFirst

  • Loading branch information...
benedikt committed Mar 22, 2012
1 parent 660768f commit c50b40674664e0e5b971931536482ffbac47a1cf
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 c50b406

Please sign in to comment.