mirror of
https://github.com/ruby/ruby.git
synced 2022-11-09 12:17:21 -05:00
parent
b40e925c92
commit
22d38d5475
1 changed files with 17 additions and 0 deletions
|
@ -98,6 +98,23 @@ module TestIRB
|
||||||
$VERBOSE = verbose
|
$VERBOSE = verbose
|
||||||
end
|
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
|
def test_default_config
|
||||||
assert_equal(true, @context.use_colorize?)
|
assert_equal(true, @context.use_colorize?)
|
||||||
end
|
end
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue