Sha256: d051d8c2d36cf626940e104845dac45519db6978c6a317e2cb9f2ae573bcf5a8
Contents?: true
Size: 878 Bytes
Versions: 9
Compression:
Stored size: 878 Bytes
Contents
require 'spec_helper' describe 'MACADDR migrations' do let!(:connection) { ActiveRecord::Base.connection } after { connection.drop_table :data_types } it 'creates an macaddr column' do lambda do connection.create_table :data_types do |t| t.macaddr :macaddr_1 t.macaddr :macaddr_2, :macaddr_3 t.column :macaddr_4, :macaddr end end.should_not raise_exception columns = connection.columns(:data_types) macaddr_1 = columns.detect { |c| c.name == 'macaddr_1'} macaddr_2 = columns.detect { |c| c.name == 'macaddr_2'} macaddr_3 = columns.detect { |c| c.name == 'macaddr_3'} macaddr_4 = columns.detect { |c| c.name == 'macaddr_4'} macaddr_1.sql_type.should eq 'macaddr' macaddr_2.sql_type.should eq 'macaddr' macaddr_3.sql_type.should eq 'macaddr' macaddr_4.sql_type.should eq 'macaddr' end end
Version data entries
9 entries across 9 versions & 1 rubygems