From b68bf40ecc611a75f3b204fada4471e9af92ce40 Mon Sep 17 00:00:00 2001 From: Aaron Patterson Date: Wed, 1 Dec 2010 09:11:30 -0800 Subject: make sure we raise type errors with unknown classes --- test/visitors/test_depth_first.rb | 7 +++++++ 1 file changed, 7 insertions(+) (limited to 'test/visitors') diff --git a/test/visitors/test_depth_first.rb b/test/visitors/test_depth_first.rb index 4015d72254..1bee0328cf 100644 --- a/test/visitors/test_depth_first.rb +++ b/test/visitors/test_depth_first.rb @@ -14,6 +14,13 @@ module Arel @visitor = Visitors::DepthFirst.new @collector end + def test_raises_with_object + assert_raises(TypeError) do + @visitor.accept(Object.new) + end + end + + # unary ops [ Arel::Nodes::Not, -- cgit v1.2.3