aboutsummaryrefslogtreecommitdiffstats
path: root/test/objspace/test_objspace.rb
diff options
context:
space:
mode:
Diffstat (limited to 'test/objspace/test_objspace.rb')
-rw-r--r--test/objspace/test_objspace.rb9
1 files changed, 4 insertions, 5 deletions
diff --git a/test/objspace/test_objspace.rb b/test/objspace/test_objspace.rb
index ea89a87e18..7c4dc0bff9 100644
--- a/test/objspace/test_objspace.rb
+++ b/test/objspace/test_objspace.rb
@@ -268,13 +268,12 @@ class TestObjSpace < Test::Unit::TestCase
end
def test_dump_uninitialized_file
- assert_in_out_err(%[-robjspace], <<-RUBY) do |output, error|
+ assert_in_out_err(%[-robjspace], <<-RUBY) do |(output), (error)|
puts ObjectSpace.dump(File.allocate)
RUBY
- assert_equal [], error
- json = JSON.load(output.join)
- assert_equal "FILE", json["type"]
- assert_nil json["fd"]
+ assert_nil error
+ assert_match /"type":"FILE"/, output
+ assert_not_match /"fd":/, output
end
end
end