Sha256: aab40d0b2935849f8c714336bc41c2bfa773801964af5f4d7b4292ffdadac2e8

Contents?: true

Size: 1.23 KB

Versions: 13

Compression:

Stored size: 1.23 KB

Contents

require_relative 'test_helper'

describe "Reload Command" do
  include TestDsl
  temporary_change_hash_value(Debugger::Command.settings, :reload_source_on_change, false)

  it "must notify that automatic reloading is off" do
    enter 'reload'
    debug_file 'reload'
    check_output_includes "Source code is reloaded. Automatic reloading is off"
  end

  it "must notify that automatic reloading is on" do
    enter 'set autoreload', 'reload'
    debug_file 'reload'
    check_output_includes "Source code is reloaded. Automatic reloading is on"
  end

  describe "reloading" do
    after { change_line_in_file(fullpath('reload'), 4, '4') }
    it "must reload the code" do
      enter 'break 3', 'cont', 'l 4-4', -> do
        change_line_in_file(fullpath('reload'), 4, '100')
        'reload'
      end, 'l 4-4'
      debug_file 'reload'
      check_output_includes "4  100"
    end
  end

  describe "Post Mortem" do
    after { change_line_in_file(fullpath('post_mortem'), 7, '        z = 4') }
    it "must work in post-mortem mode" do
      enter 'cont', -> do
        change_line_in_file(fullpath('post_mortem'), 7, 'z = 100')
        'reload'
      end, 'l 7-7'
      debug_file 'post_mortem'
      check_output_includes "7  z = 100"
    end
  end

end

Version data entries

13 entries across 12 versions & 3 rubygems

Version Path
logstash-output-icinga-1.1.0 vendor/jruby/1.9/gems/debugger-1.6.8/test/reload_test.rb
debugger-1.6.8 test/reload_test.rb
debugger-1.6.7 test/reload_test.rb
debugger-1.6.6 test/reload_test.rb
debugger-1.6.5 test/reload_test.rb
debugger-1.6.4 test/reload_test.rb
debugger-1.6.3 test/reload_test.rb
debugger-1.6.2 test/reload_test.rb
candlepin-api-0.4.0 bundle/ruby/1.9.1/gems/debugger-1.6.1/test/reload_test.rb
candlepin-api-0.4.0 bundle/ruby/gems/debugger-1.6.1/test/reload_test.rb
debugger-1.6.1 test/reload_test.rb
debugger-1.6.0 test/reload_test.rb
debugger-1.5.0 test/reload_test.rb