Sha256: 80bca78462ca9c49066fe231b0cec619cdf7f6efaae81c5d2b99ad4393ce16c4

Contents?: true

Size: 608 Bytes

Versions: 113

Compression:

Stored size: 608 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.connection_pool
        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.connection_pool
        node = Arel::Nodes::Bin.new(Arel.sql('zomg'))
        assert_equal 'BINARY zomg', viz.accept(node)
      end
    end
  end
end

Version data entries

113 entries across 95 versions & 14 rubygems

Version Path
dirty_history-0.4.10 dirty_history/ruby/1.9.1/gems/arel-2.2.1/test/nodes/test_bin.rb
dirty_history-0.4.9 dirty_history/ruby/1.9.1/gems/arel-2.2.1/test/nodes/test_bin.rb
arel-3.0.0.rc1 test/nodes/test_bin.rb
dirty_history-0.4.8 dirty_history/ruby/1.9.1/gems/arel-2.2.1/test/nodes/test_bin.rb
dirty_history-0.4.7 dirty_history/ruby/1.9.1/gems/arel-2.2.1/test/nodes/test_bin.rb
dirty_history-0.4.6 dirty_history/ruby/1.9.1/gems/arel-2.2.1/test/nodes/test_bin.rb
dirty_history-0.4.5 dirty_history/ruby/1.9.1/gems/arel-2.2.1/test/nodes/test_bin.rb
dirty_history-0.4.4 dirty_history/ruby/1.9.1/gems/arel-2.2.1/test/nodes/test_bin.rb
dirty_history-0.4.3 dirty_history/ruby/1.9.1/gems/arel-2.2.1/test/nodes/test_bin.rb
dirty_history-0.4.2 dirty_history/ruby/1.9.1/gems/arel-2.2.1/test/nodes/test_bin.rb
dirty_history-0.3.0 dirty_history/ruby/1.9.1/gems/arel-2.2.1/test/nodes/test_bin.rb
arel-2.2.1 test/nodes/test_bin.rb
arel-2.2.0 test/nodes/test_bin.rb