aboutsummaryrefslogtreecommitdiffstats
path: root/activerecord/test/cases/adapters
diff options
context:
space:
mode:
authorStephen Celis <stephen@stephencelis.com>2012-01-19 11:12:21 -0800
committerStephen Celis <stephen@stephencelis.com>2012-01-20 10:44:08 -0800
commit920070e42b33c5bdaf62977ed22aa867a455ffd5 (patch)
tree00af6951abc877afb68513f9b6743c99cb0bd95b /activerecord/test/cases/adapters
parent30b0e5848c5a91c0bfd1ef33ec4b9bc36bcead0b (diff)
downloadrails-920070e42b33c5bdaf62977ed22aa867a455ffd5.tar.gz
rails-920070e42b33c5bdaf62977ed22aa867a455ffd5.tar.bz2
rails-920070e42b33c5bdaf62977ed22aa867a455ffd5.zip
Don't type-cast unknown types to YAML.
Diffstat (limited to 'activerecord/test/cases/adapters')
-rw-r--r--activerecord/test/cases/adapters/sqlite3/quoting_test.rb4
1 files changed, 2 insertions, 2 deletions
diff --git a/activerecord/test/cases/adapters/sqlite3/quoting_test.rb b/activerecord/test/cases/adapters/sqlite3/quoting_test.rb
index e0152e7ccf..46da1b0a2b 100644
--- a/activerecord/test/cases/adapters/sqlite3/quoting_test.rb
+++ b/activerecord/test/cases/adapters/sqlite3/quoting_test.rb
@@ -70,9 +70,9 @@ module ActiveRecord
assert_equal bd.to_f, @conn.type_cast(bd, nil)
end
- def test_type_cast_unknown
+ def test_type_cast_unknown_should_raise_error
obj = Class.new.new
- assert_equal YAML.dump(obj), @conn.type_cast(obj, nil)
+ assert_raise(TypeError) { @conn.type_cast(obj, nil) }
end
def test_quoted_id