diff options
author | Aaron Patterson <aaron.patterson@gmail.com> | 2010-11-29 14:23:58 -0800 |
---|---|---|
committer | Aaron Patterson <aaron.patterson@gmail.com> | 2010-11-29 14:23:58 -0800 |
commit | 61e0280b5d5cd36a5340ba8478d0bc1c9c5fea41 (patch) | |
tree | 500251b1c55330c33f1af8d06dab075696d0ae38 /test/visitors | |
parent | 20cd623aba6cc0c1b08b7d6fcf277633cfe236d4 (diff) | |
download | rails-61e0280b5d5cd36a5340ba8478d0bc1c9c5fea41.tar.gz rails-61e0280b5d5cd36a5340ba8478d0bc1c9c5fea41.tar.bz2 rails-61e0280b5d5cd36a5340ba8478d0bc1c9c5fea41.zip |
adding select core
Diffstat (limited to 'test/visitors')
-rw-r--r-- | test/visitors/test_depth_first.rb | 18 |
1 files changed, 18 insertions, 0 deletions
diff --git a/test/visitors/test_depth_first.rb b/test/visitors/test_depth_first.rb index fd91dd5fb9..a318583e26 100644 --- a/test/visitors/test_depth_first.rb +++ b/test/visitors/test_depth_first.rb @@ -84,6 +84,24 @@ module Arel assert_equal [:a, :b, stmt.values, :c, stmt.wheres, :d, stmt.orders, :e, stmt], @collector.calls end + + def test_select_core + core = Nodes::SelectCore.new + core.projections << :a + core.froms = :b + core.wheres << :c + core.groups << :d + core.having = :e + + @visitor.accept core + assert_equal [ + :a, core.projections, + :b, + :c, core.wheres, + :d, core.groups, + :e, + core], @collector.calls + end end end end |