aboutsummaryrefslogtreecommitdiffstats
path: root/test/visitors
diff options
context:
space:
mode:
authorAaron Patterson <aaron.patterson@gmail.com>2011-04-21 15:50:19 -0500
committerAaron Patterson <aaron.patterson@gmail.com>2011-04-21 15:50:19 -0500
commitf72989de5b3b3cfb6e6e639b57c3a3bebb2de8f2 (patch)
tree5f503522ff51b1ff1733306db0546c6c870b59b5 /test/visitors
parent0b9af9762a5f3431f83a9bba6919fef9346e310a (diff)
downloadrails-f72989de5b3b3cfb6e6e639b57c3a3bebb2de8f2.tar.gz
rails-f72989de5b3b3cfb6e6e639b57c3a3bebb2de8f2.tar.bz2
rails-f72989de5b3b3cfb6e6e639b57c3a3bebb2de8f2.zip
raising not implemented exceptions for distinct on where it is not supported
Diffstat (limited to 'test/visitors')
-rw-r--r--test/visitors/test_to_sql.rb11
1 files changed, 11 insertions, 0 deletions
diff --git a/test/visitors/test_to_sql.rb b/test/visitors/test_to_sql.rb
index 25ff7be3e2..1d5f89280b 100644
--- a/test/visitors/test_to_sql.rb
+++ b/test/visitors/test_to_sql.rb
@@ -299,6 +299,17 @@ module Arel
}
end
end
+
+ describe 'distinct on' do
+ it 'raises not implemented error' do
+ core = Arel::Nodes::SelectCore.new
+ core.set_quantifier = Arel::Nodes::DistinctOn.new(Arel.sql('aaron'))
+
+ assert_raises(NotImplementedError) do
+ @visitor.accept(core)
+ end
+ end
+ end
end
end
end