From f0139a16c263ba62e7e45d462a4fff411ebf2523 Mon Sep 17 00:00:00 2001 From: Aaron Patterson Date: Tue, 16 Nov 2010 08:09:26 -0800 Subject: returning undefined for unknown column types --- test/test_attributes.rb | 5 +++++ 1 file changed, 5 insertions(+) (limited to 'test') diff --git a/test/test_attributes.rb b/test/test_attributes.rb index 8fc9327b0f..3654e78314 100644 --- a/test/test_attributes.rb +++ b/test/test_attributes.rb @@ -3,6 +3,11 @@ require 'helper' module Arel describe 'Attributes' do describe 'for' do + it 'deals with unknown column types' do + column = Struct.new(:type).new :crazy + Attributes.for(column).must_equal Attributes::Undefined + end + it 'returns the correct constant for strings' do [:string, :text, :binary].each do |type| column = Struct.new(:type).new type -- cgit v1.2.3