Sha256: e34d3ef3629964e7bcfabfca1bdf0232c8b40c197918ca1a4bdf99a98d0a69fb
Contents?: true
Size: 1.49 KB
Versions: 3
Compression:
Stored size: 1.49 KB
Contents
require_relative 'test_helper' describe 'Quit Command' do include TestDsl it 'must quit if user confirmed' do Byebug::QuitCommand.any_instance.expects(:exit!) enter 'quit', 'y' debug_file 'quit' check_output_includes 'Really quit? (y/n)', interface.confirm_queue end it 'must not quit if user didn\'t confirm' do Byebug::QuitCommand.any_instance.expects(:exit!).never enter 'quit', 'n' debug_file 'quit' check_output_includes 'Really quit? (y/n)', interface.confirm_queue end it 'must quit immediatly if used with !' do Byebug::QuitCommand.any_instance.expects(:exit!) enter 'quit!' debug_file 'quit' check_output_doesnt_include 'Really quit? (y/n)', interface.confirm_queue end it 'must quit immediatly if used with "unconditionally"' do Byebug::QuitCommand.any_instance.expects(:exit!) enter 'quit unconditionally' debug_file 'quit' check_output_doesnt_include 'Really quit? (y/n)', interface.confirm_queue end it 'must finalize interface before quitting' do Byebug::QuitCommand.any_instance.stubs(:exit!) interface.expects(:finalize) enter 'quit!' debug_file 'quit' end it 'must quit if used "exit" alias' do Byebug::QuitCommand.any_instance.expects(:exit!) enter 'exit!' debug_file 'quit' end describe 'Post Mortem' do it 'must work in post-mortem mode' do Byebug::QuitCommand.any_instance.expects(:exit!) enter 'cont', 'exit!' debug_file 'post_mortem' end end end
Version data entries
3 entries across 3 versions & 1 rubygems
Version | Path |
---|---|
byebug-1.2.0 | test/quit_test.rb |
byebug-1.1.1 | test/quit_test.rb |
byebug-1.1.0 | test/quit_test.rb |