Sha256: 6414b76270dfd1446b82b4c83c443c13f761f8c4769d7a24416cbff2bbec55ff
Contents?: true
Size: 471 Bytes
Versions: 3
Compression:
Stored size: 471 Bytes
Contents
require 'psych/helper' module Psych class Tagged yaml_tag '!foo' attr_accessor :baz def initialize @baz = 'bar' end end class TestObject < TestCase def test_dump_with_tag tag = Tagged.new assert_match('foo', Psych.dump(tag)) end def test_tag_round_trip tag = Tagged.new tag2 = Psych.load(Psych.dump(tag)) assert_equal tag.baz, tag2.baz assert_instance_of(Tagged, tag2) end end end
Version data entries
3 entries across 3 versions & 1 rubygems
Version | Path |
---|---|
psych-1.2.0 | test/psych/test_object.rb |
psych-1.1.1 | test/psych/test_object.rb |
psych-1.1.0 | test/psych/test_object.rb |