mirror of
https://github.com/github/rails.git
synced 2026-04-26 03:00:59 -04:00
make sure that Psych can roundtrip an AR object
This commit is contained in:
@@ -17,4 +17,17 @@ class YamlSerializationTest < ActiveRecord::TestCase
|
||||
t = YAML.load YAML.dump topic
|
||||
assert_equal topic, t
|
||||
end
|
||||
|
||||
begin
|
||||
require 'psych'
|
||||
|
||||
def test_psych_roundtrip
|
||||
topic = Topic.first
|
||||
assert topic
|
||||
t = Psych.load Psych.dump topic
|
||||
assert_equal topic, t
|
||||
end
|
||||
|
||||
rescue LoadError
|
||||
end
|
||||
end
|
||||
|
||||
Reference in New Issue
Block a user