summaryrefslogtreecommitdiff
path: root/test
diff options
context:
space:
mode:
authorAaron Patterson <aaron.patterson@gmail.com>2011-06-08 17:28:41 -0700
committerAaron Patterson <aaron.patterson@gmail.com>2011-06-08 18:58:57 -0700
commit81a8408b358df3710b7ebdd76bec99aeea3580ed (patch)
tree3d7be110458dfe6b5b18cc117392229f9fcd65ec /test
parente28d3dbca422250d291e98d39d9c4ef2317e3b8c (diff)
downloadpsych-81a8408b358df3710b7ebdd76bec99aeea3580ed.zip
adding module serialization support
Diffstat (limited to 'test')
-rw-r--r--test/psych/test_class.rb17
1 files changed, 17 insertions, 0 deletions
diff --git a/test/psych/test_class.rb b/test/psych/test_class.rb
index 8fd4ad0..156f2fb 100644
--- a/test/psych/test_class.rb
+++ b/test/psych/test_class.rb
@@ -2,12 +2,21 @@ require 'psych/helper'
module Psych
class TestClass < TestCase
+ module Foo
+ end
+
def test_cycle_anonymous_class
assert_raises(::TypeError) do
assert_cycle(Class.new)
end
end
+ def test_cycle_anonymous_module
+ assert_raises(::TypeError) do
+ assert_cycle(Module.new)
+ end
+ end
+
def test_cycle
assert_cycle(TestClass)
end
@@ -15,5 +24,13 @@ module Psych
def test_dump
Psych.dump TestClass
end
+
+ def test_cycle_module
+ assert_cycle(Foo)
+ end
+
+ def test_dump_module
+ Psych.dump Foo
+ end
end
end