test/frame_test.rb in byebug-1.8.2 vs test/frame_test.rb in byebug-2.0.0
- old
+ new
@@ -42,13 +42,12 @@
enter 'up', 'frame 0'
debug_file('frame') { $state.line.must_equal 23 }
end
it 'must set frame to the last one' do
- enter 'bt', 'frame -1'
+ enter 'frame -1'
debug_file('frame') { $state.file.must_match /minitest\/unit.rb/ }
- check_output_doesnt_include "at #{@tst_file}:"
end
it 'must not set frame if the frame number is too low' do
enter 'down'
debug_file('frame') { $state.line.must_equal 23 }
@@ -68,11 +67,11 @@
separator = File::ALT_SEPARATOR || File::SEPARATOR
"...#{separator}" + fullpath.split(separator)[-3..-1].join(separator)
end
describe 'when set' do
- temporary_change_hash Byebug::Command.settings, :frame_fullpath, true
+ temporary_change_hash Byebug.settings, :fullpath, true
it 'must display current backtrace with fullpaths' do
enter 'where'
debug_file 'frame'
check_output_includes \
@@ -81,11 +80,11 @@
/#2 FrameExample\.b\s+at #{@tst_file}:13/
end
end
describe 'when unset' do
- temporary_change_hash Byebug::Command.settings, :frame_fullpath, false
+ temporary_change_hash Byebug.settings, :fullpath, false
it 'must display current backtrace with shortpaths' do
enter 'where'
debug_file 'frame'
check_output_includes \
@@ -97,11 +96,11 @@
end
end
describe 'callstyle' do
describe 'long' do
- temporary_change_hash Byebug::Command.settings, :callstyle, :long
+ temporary_change_hash Byebug.settings, :callstyle, :long
it 'displays current backtrace with callstyle "long"' do
enter 'where'
debug_file 'frame'
check_output_includes \
@@ -111,11 +110,11 @@
/#3 FrameExample\.a\s+at #{@tst_file}:9/
end
end
describe 'short' do
- temporary_change_hash Byebug::Command.settings, :callstyle, :short
+ temporary_change_hash Byebug.settings, :callstyle, :short
it 'displays current backtrace with callstyle "short"' do
enter 'where'
debug_file 'frame'
check_output_includes /--> #0 d\(e\)\s+at #{@tst_file}:23/,
@@ -193,12 +192,6 @@
debug_file 'frame'
check_output_includes "Can't navigate to c-frame", interface.error_queue
end
end
- describe 'Post Mortem' do
- it 'must work in post-mortem mode' do
- enter 'cont', 'frame'
- debug_file('post_mortem') { $state.line.must_equal 8 }
- end
- end
end