aboutsummaryrefslogtreecommitdiffstats
path: root/test/visitors/test_depth_first.rb
diff options
context:
space:
mode:
Diffstat (limited to 'test/visitors/test_depth_first.rb')
-rw-r--r--test/visitors/test_depth_first.rb12
1 files changed, 11 insertions, 1 deletions
diff --git a/test/visitors/test_depth_first.rb b/test/visitors/test_depth_first.rb
index 1bee0328cf..1f1c7ab361 100644
--- a/test/visitors/test_depth_first.rb
+++ b/test/visitors/test_depth_first.rb
@@ -78,7 +78,6 @@ module Arel
end
[
- Arel::Nodes::And,
Arel::Nodes::Assignment,
Arel::Nodes::Between,
Arel::Nodes::DoesNotMatch,
@@ -106,6 +105,17 @@ module Arel
end
end
+ # N-ary
+ [
+ Arel::Nodes::And,
+ ].each do |klass|
+ define_method("test_#{klass.name.gsub('::', '_')}") do
+ binary = klass.new([:a, :b])
+ @visitor.accept binary
+ assert_equal [:a, :b, binary], @collector.calls
+ end
+ end
+
[
Arel::Attributes::Integer,
Arel::Attributes::Float,