Sha256: c7f8be6b6bcd6124124619fb30068744afe9398a981c71c73e8067c5fc3667ff
Contents?: true
Size: 832 Bytes
Versions: 9
Compression:
Stored size: 832 Bytes
Contents
require 'spec_helper' describe 'MACADDR migrations' do let!(:connection) { ActiveRecord::Base.connection } 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