public
Rubygem
Description: An ActiveRecord to the DBSlayer lightweight proxy/pooling layer (http://code.nytimes.com/projects/dbslayer)
Clone URL: git://github.com/harrisj/activerecord-dbslayer-adapter.git
activerecord-dbslayer-adapter / test / test_dbslayer_column.rb
100644 13 lines (11 sloc) 0.475 kb
1
2
3
4
5
6
7
8
9
10
11
12
13
require File.dirname(__FILE__) + '/helper.rb'
 
class Test_ActiveRecord_ConnectionAdapters_DbslayerColumn < Test::Unit::TestCase
  def setup
    @column = ActiveRecord::ConnectionAdapters::DbslayerColumn.new('foo', false, 'tinyint(1)')
  end
  
  # the only thing changed from the MySQL one
  def test_boolean_coerce
    ActiveRecord::ConnectionAdapters::DbslayerAdapter.emulate_booleans = true
    assert_equal :boolean, @column.send(:simplified_type, "tinyint(1)")
  end
end