diff options
author | Mike Mangino <mmangino@elevatedrails.com> | 2013-04-02 11:45:14 -0400 |
---|---|---|
committer | Mike Mangino <mmangino@elevatedrails.com> | 2013-04-02 11:45:14 -0400 |
commit | 1bf6b53aa4de9267dcca42382d841cf96e98b55f (patch) | |
tree | ee41fe697ec160226486bbcae7233107c3bd6300 /activerecord/test/cases | |
parent | a4743960a09139c3bd4d72a8f3a72ade8f4add2f (diff) | |
download | rails-1bf6b53aa4de9267dcca42382d841cf96e98b55f.tar.gz rails-1bf6b53aa4de9267dcca42382d841cf96e98b55f.tar.bz2 rails-1bf6b53aa4de9267dcca42382d841cf96e98b55f.zip |
Remove all error masking when decoding serialized data fails?
Diffstat (limited to 'activerecord/test/cases')
-rw-r--r-- | activerecord/test/cases/coders/yaml_column_test.rb | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/activerecord/test/cases/coders/yaml_column_test.rb b/activerecord/test/cases/coders/yaml_column_test.rb index 45e986c7b6..b72c54f97b 100644 --- a/activerecord/test/cases/coders/yaml_column_test.rb +++ b/activerecord/test/cases/coders/yaml_column_test.rb @@ -43,10 +43,12 @@ module ActiveRecord assert_equal [], coder.load([]) end - def test_load_swallows_yaml_exceptions + def test_load_doesnt_swallow_yaml_exceptions coder = YAMLColumn.new bad_yaml = '--- {' - assert_equal bad_yaml, coder.load(bad_yaml) + assert_raises(Psych::SyntaxError) do + coder.load(bad_yaml) + end end def test_load_doesnt_handle_undefined_class_or_module |