summaryrefslogtreecommitdiff
path: root/test/objspace
diff options
context:
space:
mode:
authorktsj <ktsj@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2014-03-11 13:23:43 +0000
committerktsj <ktsj@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2014-03-11 13:23:43 +0000
commitb204fe182f30cf2ec874771eae92dd09413d19b3 (patch)
treeeccf671c5ec98795192a2ad8c5ef9c44ae5627b6 /test/objspace
parentd4ab41e393097969af0343e453614ba5f4bcd43b (diff)
* test/objspace/test_objspace.rb (TestObjSpace#test_dump_uninitialized_file):
remove dependency on json library. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@45316 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
Diffstat (limited to 'test/objspace')
-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 ea89a87..7c4dc0b 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