diff options
Diffstat (limited to 'test')
-rw-r--r-- | test/nodes/test_node.rb | 1 | ||||
-rw-r--r-- | test/visitors/test_to_sql.rb | 6 |
2 files changed, 7 insertions, 0 deletions
diff --git a/test/nodes/test_node.rb b/test/nodes/test_node.rb index b8d06b9ccc..335cba8aab 100644 --- a/test/nodes/test_node.rb +++ b/test/nodes/test_node.rb @@ -11,6 +11,7 @@ module Arel Nodes.const_get(k) }.grep(Class).each do |klass| next if Nodes::SqlLiteral == klass + next if Nodes::BindParam == klass next if klass.name =~ /^Arel::Nodes::Test/ assert klass.ancestors.include?(Nodes::Node), klass.name end diff --git a/test/visitors/test_to_sql.rb b/test/visitors/test_to_sql.rb index 9b86a89300..f832bdf925 100644 --- a/test/visitors/test_to_sql.rb +++ b/test/visitors/test_to_sql.rb @@ -9,6 +9,12 @@ module Arel @attr = @table[:id] end + it 'works with BindParams' do + node = Nodes::BindParam.new 'omg' + sql = @visitor.accept node + sql.must_be_like 'omg' + end + it 'can define a dispatch method' do visited = false viz = Class.new(Arel::Visitors::Visitor) { |