diff options
author | Aaron Patterson <aaron.patterson@gmail.com> | 2010-12-01 09:11:30 -0800 |
---|---|---|
committer | Aaron Patterson <aaron.patterson@gmail.com> | 2010-12-01 09:11:30 -0800 |
commit | b68bf40ecc611a75f3b204fada4471e9af92ce40 (patch) | |
tree | 66370a41b93400d1aa0774bb61c3ceb10c15bb3e /test/visitors/test_depth_first.rb | |
parent | c9fe1b3e2b6124bf5c6df27b89d9efa1e58fdd9c (diff) | |
download | rails-b68bf40ecc611a75f3b204fada4471e9af92ce40.tar.gz rails-b68bf40ecc611a75f3b204fada4471e9af92ce40.tar.bz2 rails-b68bf40ecc611a75f3b204fada4471e9af92ce40.zip |
make sure we raise type errors with unknown classes
Diffstat (limited to 'test/visitors/test_depth_first.rb')
-rw-r--r-- | test/visitors/test_depth_first.rb | 7 |
1 files changed, 7 insertions, 0 deletions
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, |