aboutsummaryrefslogtreecommitdiffstats
path: root/activerecord/test
diff options
context:
space:
mode:
authorDavid Heinemeier Hansson <david@loudthinking.com>2005-09-11 09:41:24 +0000
committerDavid Heinemeier Hansson <david@loudthinking.com>2005-09-11 09:41:24 +0000
commit57070277b420819b9bf0980e1a794a587f31dff6 (patch)
tree794a149d7a75e219bee6b8bbae8b57640414e0ae /activerecord/test
parentffbaf1c5ff50a12514405ced230a2bd76f6405fe (diff)
downloadrails-57070277b420819b9bf0980e1a794a587f31dff6.tar.gz
rails-57070277b420819b9bf0980e1a794a587f31dff6.tar.bz2
rails-57070277b420819b9bf0980e1a794a587f31dff6.zip
Added better exception error when unknown column types are used with migrations #1814 [fbeausoleil@ftml.net]
git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@2201 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
Diffstat (limited to 'activerecord/test')
-rw-r--r--activerecord/test/active_schema_test.rb14
1 files changed, 14 insertions, 0 deletions
diff --git a/activerecord/test/active_schema_test.rb b/activerecord/test/active_schema_test.rb
new file mode 100644
index 0000000000..d2617167a0
--- /dev/null
+++ b/activerecord/test/active_schema_test.rb
@@ -0,0 +1,14 @@
+require 'abstract_unit'
+
+class ActiveSchemaTest < Test::Unit::TestCase
+ def test_add_column_with_native_type_rejected
+ assert_raises ActiveRecord::UnknownTypeError do
+ add_column(:people, :varchar, :limit => 15)
+ end
+ end
+
+ private
+ def method_missing(method_symbol, *arguments)
+ ActiveRecord::Base.connection.send(method_symbol, *arguments)
+ end
+end \ No newline at end of file