From 4146538dfd7066eb38fff29e73c739912acad13f Mon Sep 17 00:00:00 2001 From: Aaron Patterson Date: Mon, 16 Aug 2010 14:43:18 -0700 Subject: IN seems to work --- spec/arel/visitors/to_sql_spec.rb | 9 +++++++++ 1 file changed, 9 insertions(+) (limited to 'spec/arel/visitors/to_sql_spec.rb') diff --git a/spec/arel/visitors/to_sql_spec.rb b/spec/arel/visitors/to_sql_spec.rb index a266e87d22..1d78395b2f 100644 --- a/spec/arel/visitors/to_sql_spec.rb +++ b/spec/arel/visitors/to_sql_spec.rb @@ -13,6 +13,15 @@ module Arel @visitor.accept attr end + describe "Nodes::In" do + it "should know how to visit" do + node = @attr.in [1, 2, 3] + @visitor.accept(node).should be_like %{ + "users"."id" IN (1, 2, 3) + } + end + end + describe 'Equality' do it "should escape strings" do test = @attr.eq 'Aaron Patterson' -- cgit v1.2.3