From e28d3dbca422250d291e98d39d9c4ef2317e3b8c Mon Sep 17 00:00:00 2001 From: Aaron Patterson Date: Wed, 8 Jun 2011 17:06:46 -0700 Subject: ruby classes can round trip --- test/psych/test_class.rb | 12 +++++++----- 1 file changed, 7 insertions(+), 5 deletions(-) (limited to 'test') diff --git a/test/psych/test_class.rb b/test/psych/test_class.rb index cba88ba..8fd4ad0 100644 --- a/test/psych/test_class.rb +++ b/test/psych/test_class.rb @@ -2,16 +2,18 @@ require 'psych/helper' module Psych class TestClass < TestCase - def test_cycle + def test_cycle_anonymous_class assert_raises(::TypeError) do - assert_cycle(TestClass) + assert_cycle(Class.new) end end + def test_cycle + assert_cycle(TestClass) + end + def test_dump - assert_raises(::TypeError) do - Psych.dump TestClass - end + Psych.dump TestClass end end end -- cgit v1.2.3