Sha256: 83fcecd236fdd41c79d41f4fc3332b49f5b35811887a59223e5e86a24f08f97f

Contents?: true

Size: 576 Bytes

Versions: 5

Compression:

Stored size: 576 Bytes

Contents

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

Version data entries

5 entries across 5 versions & 1 rubygems

Version Path
arel-2.1.4 test/nodes/test_bin.rb
arel-2.1.3 test/nodes/test_bin.rb
arel-2.1.2 test/nodes/test_bin.rb
arel-2.1.1 test/nodes/test_bin.rb
arel-2.1.0 test/nodes/test_bin.rb