From 162e1d8df332f170b9dafdc91f60ee2cb359c1e5 Mon Sep 17 00:00:00 2001 From: Aaron Patterson Date: Wed, 22 Dec 2010 18:02:56 -0800 Subject: sql literals may be used as column attributes --- test/visitors/test_to_sql.rb | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) (limited to 'test') diff --git a/test/visitors/test_to_sql.rb b/test/visitors/test_to_sql.rb index 80384d3c28..530bd73f6d 100644 --- a/test/visitors/test_to_sql.rb +++ b/test/visitors/test_to_sql.rb @@ -5,7 +5,14 @@ module Arel describe 'the to_sql visitor' do before do @visitor = ToSql.new Table.engine - @attr = Table.new(:users)[:id] + @table = Table.new(:users) + @attr = @table[:id] + end + + it 'should not quote sql literals' do + node = @table[Arel.star] + sql = @visitor.accept node + sql.must_be_like '"users".*' end describe 'equality' do -- cgit v1.2.3