diff options
author | Aaron Patterson <aaron.patterson@gmail.com> | 2010-09-10 13:26:30 -0700 |
---|---|---|
committer | Aaron Patterson <aaron.patterson@gmail.com> | 2010-09-10 13:26:30 -0700 |
commit | e06061089735b34ac10465684db5a08d90623469 (patch) | |
tree | 511ea74844751dbce5a6a6458fe3241d7126d7a1 /spec/arel/visitors | |
parent | 9fdaf497cb346696ea538308b77ec07f051cd569 (diff) | |
download | rails-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.rb | 7 |
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 |