Sha256: 6115859e1971029e4cb8b8d0dbaded051a3c3cdd932dccef81d5cb70159a0daa
Contents?: true
Size: 1.01 KB
Versions: 9
Compression:
Stored size: 1.01 KB
Contents
class TestSource < TestDsl::TestCase let(:filename) { 'source_example.txt' } before { File.open(filename, 'w') do |f| f.puts 'break 2' f.puts 'break 3 if true' end } after { FileUtils.rm(filename) } it 'must run commands from file' do enter "source #{filename}" debug_file 'source' do Byebug.breakpoints[0].pos.must_equal 2 Byebug.breakpoints[1].pos.must_equal 3 Byebug.breakpoints[1].expr.must_equal 'true' end end it 'must be able to use shortcut' do enter "so #{filename}" debug_file('source') { Byebug.breakpoints[0].pos.must_equal 2 } end it 'must show an error if file is not found' do enter 'source blabla' debug_file 'source' check_error_includes(/File ".*blabla" not found/) end describe 'Help' do it 'must show help when used without arguments' do enter 'source' debug_file 'source' check_output_includes \ "source FILE\texecutes a file containing byebug commands" end end end
Version data entries
9 entries across 9 versions & 2 rubygems