aboutsummaryrefslogtreecommitdiffstats
path: root/spec/arel/visitors
diff options
context:
space:
mode:
authorAaron Patterson <aaron.patterson@gmail.com>2010-09-10 13:26:30 -0700
committerAaron Patterson <aaron.patterson@gmail.com>2010-09-10 13:26:30 -0700
commite06061089735b34ac10465684db5a08d90623469 (patch)
tree511ea74844751dbce5a6a6458fe3241d7126d7a1 /spec/arel/visitors
parent9fdaf497cb346696ea538308b77ec07f051cd569 (diff)
downloadrails-e06061089735b34ac10465684db5a08d90623469.tar.gz
rails-e06061089735b34ac10465684db5a08d90623469.tar.bz2
rails-e06061089735b34ac10465684db5a08d90623469.zip
equality should handle nil correctly
Diffstat (limited to 'spec/arel/visitors')
-rw-r--r--spec/arel/visitors/to_sql_spec.rb7
1 files changed, 7 insertions, 0 deletions
diff --git a/spec/arel/visitors/to_sql_spec.rb b/spec/arel/visitors/to_sql_spec.rb
index ed8487c6eb..f8327b02f6 100644
--- a/spec/arel/visitors/to_sql_spec.rb
+++ b/spec/arel/visitors/to_sql_spec.rb
@@ -8,6 +8,13 @@ module Arel
@attr = Table.new(:users)[:id]
end
+ describe 'equality' do
+ it 'should handle false' do
+ sql = @visitor.accept Nodes::Equality.new(false, false)
+ sql.should be_like %{ 'f' = 'f' }
+ end
+ end
+
it "should visit_DateTime" do
@visitor.accept DateTime.now
end