1
0
Fork 0
mirror of https://github.com/ruby/ruby.git synced 2022-11-09 12:17:21 -05:00

[ruby/irb] Add test_eval_object_without_inspect_method

https://github.com/ruby/irb/commit/c0d9a26bce
This commit is contained in:
aycabta 2020-06-24 18:41:10 +09:00
parent b40e925c92
commit 22d38d5475

View file

@ -98,6 +98,23 @@ module TestIRB
$VERBOSE = verbose
end
def test_eval_object_without_inspect_method
verbose, $VERBOSE = $VERBOSE, nil
input = TestInputMethod.new([
"BasicObject.new\n",
])
irb = IRB::Irb.new(IRB::WorkSpace.new(Object.new), input)
out, err = capture_output do
irb.eval_input
end
assert_empty err
assert_pattern_list([:*, /\(Object doesn't support #inspect\)/,
:*, /=> \n/,
/\s*/], out)
ensure
$VERBOSE = verbose
end
def test_default_config
assert_equal(true, @context.use_colorize?)
end