From bd3ecd761e7b52eabf32efe2f5c4ad722423a623 Mon Sep 17 00:00:00 2001 From: Aaron Patterson Date: Mon, 16 Aug 2010 14:09:48 -0700 Subject: quoting strings from equality statements, adding to_dot --- spec/arel/visitors/to_sql_spec.rb | 9 +++++++++ 1 file changed, 9 insertions(+) (limited to 'spec/arel') diff --git a/spec/arel/visitors/to_sql_spec.rb b/spec/arel/visitors/to_sql_spec.rb index 7600d53862..a266e87d22 100644 --- a/spec/arel/visitors/to_sql_spec.rb +++ b/spec/arel/visitors/to_sql_spec.rb @@ -12,6 +12,15 @@ module Arel attr = Attributes::Time.new(@attr.relation, @attr.name, @attr.column) @visitor.accept attr end + + describe 'Equality' do + it "should escape strings" do + test = @attr.eq 'Aaron Patterson' + @visitor.accept(test).should be_like %{ + "users"."id" = 'Aaron Patterson' + } + end + end end end end -- cgit v1.2.3