diff options
Diffstat (limited to 'test/test_parser.rb')
-rw-r--r-- | test/test_parser.rb | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/test/test_parser.rb b/test/test_parser.rb index dab2e77..c8eaa4d 100644 --- a/test/test_parser.rb +++ b/test/test_parser.rb @@ -289,4 +289,12 @@ class TestParser < Test::Unit::TestCase assert @hp.headers(env = {}, resp) assert_equal '', env['Host'] end + + def test_memsize + require 'objspace' + n = ObjectSpace.memsize_of(@hp) + assert_kind_of Integer, n + rescue LoadError + warn 'ObjectSpace not available' + end end |