1
0
Fork 0
mirror of https://github.com/rails/rails.git synced 2022-11-09 12:12:34 -05:00
rails--rails/test/nodes/test_bin.rb
2011-04-11 10:02:28 -07:00

23 lines
576 B
Ruby

require 'helper'
module Arel
module Nodes
class TestBin < MiniTest::Unit::TestCase
def test_new
assert Arel::Nodes::Bin.new('zomg')
end
def test_default_to_sql
viz = Arel::Visitors::ToSql.new Table.engine
node = Arel::Nodes::Bin.new(Arel.sql('zomg'))
assert_equal 'zomg', viz.accept(node)
end
def test_mysql_to_sql
viz = Arel::Visitors::MySQL.new Table.engine
node = Arel::Nodes::Bin.new(Arel.sql('zomg'))
assert_equal 'BINARY zomg', viz.accept(node)
end
end
end
end