diff options
Diffstat (limited to 'trunk/test/test_singleton.rb')
-rw-r--r-- | trunk/test/test_singleton.rb | 15 |
1 files changed, 15 insertions, 0 deletions
diff --git a/trunk/test/test_singleton.rb b/trunk/test/test_singleton.rb new file mode 100644 index 0000000000..bd11095cf2 --- /dev/null +++ b/trunk/test/test_singleton.rb @@ -0,0 +1,15 @@ +require 'test/unit' +require 'singleton' + +class TestSingleton < Test::Unit::TestCase + class C + include Singleton + end + + def test_marshal + o1 = C.instance + m = Marshal.dump(o1) + o2 = Marshal.load(m) + assert_same(o1, o2) + end +end |