aboutsummaryrefslogtreecommitdiffstats
path: root/spec/arel/visitors
diff options
context:
space:
mode:
Diffstat (limited to 'spec/arel/visitors')
-rw-r--r--spec/arel/visitors/to_sql_spec.rb9
1 files changed, 9 insertions, 0 deletions
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