test/eval_test.rb in byebug-1.8.2 vs test/eval_test.rb in byebug-2.0.0
- old
+ new
@@ -36,22 +36,22 @@
end
end
describe 'stack trace on error' do
describe 'when enabled' do
- temporary_change_hash Byebug::Command.settings, :stack_trace_on_error, true
+ temporary_change_hash Byebug.settings, :stack_trace_on_error, true
it 'must show a stack trace' do
enter 'eval 2 / 0'
debug_file 'eval'
check_output_includes /\S+:\d+:in `eval':divided by 0/
check_output_doesnt_include 'ZeroDivisionError Exception: divided by 0'
end
end
describe 'when disabled' do
- temporary_change_hash Byebug::Command.settings, :stack_trace_on_error, false
+ temporary_change_hash Byebug.settings, :stack_trace_on_error, false
it 'must only show exception' do
enter 'eval 2 / 0'
debug_file 'eval'
check_output_includes 'ZeroDivisionError Exception: divided by 0'
@@ -67,33 +67,24 @@
check_output_includes "{:a=>\"#{'3' * 40}\",\n :b=>\"#{'4' * 30}\"}"
end
end
describe 'putl' do
- temporary_change_hash Byebug::Command.settings, :width, 20
+ temporary_change_hash Byebug.settings, :width, 20
it 'must print expression and columnize the result' do
enter 'putl [1, 2, 3, 4, 5, 9, 8, 7, 6]'
debug_file 'eval'
check_output_includes "1 3 5 8 6\n2 4 9 7"
end
end
describe 'ps' do
- temporary_change_hash Byebug::Command.settings, :width, 20
+ temporary_change_hash Byebug.settings, :width, 20
it 'must print expression and sort and columnize the result' do
enter 'ps [1, 2, 3, 4, 5, 9, 8, 7, 6]'
debug_file 'eval'
check_output_includes "1 3 5 7 9\n2 4 6 8"
end
end
-
- describe 'Post Mortem' do
- it 'must work in post-mortem mode' do
- enter 'cont', 'eval 2 + 2'
- debug_file 'post_mortem'
- check_output_includes '4'
- end
- end
-
end