Permalink
Browse files

Added test for Sequel/Arel compatibility fix.

  • Loading branch information...
1 parent fbdf4c4 commit 8d4593ea5dcedb1d32b61240fe9c4464bc49153c @fimmtiu committed Sep 6, 2012
Showing with 11 additions and 0 deletions.
  1. +11 −0 test/visitors/test_to_sql.rb
@@ -344,6 +344,17 @@ def quote value, column = nil
end
end
end
+
+ begin
+ require 'sequel'
+ it "should visit_Sequel_SQL_AliasedExpression if Sequel is present" do
+ [:to_sym, :to_s].each do |fn|
+ sql = @visitor.accept Sequel::SQL::AliasedExpression.new(*%w(foo bar).map(&fn))
+ sql.must_be_like "foo AS bar"
+ end
+ end
+ rescue LoadError
+ end
end
end
end

0 comments on commit 8d4593e

Please sign in to comment.