Sha256: 93eefd4deb1bbb1dfaa19319e6357647ce04b5ed6cc5a7e1fc6e0e371c08d439

Contents?: true

Size: 1.06 KB

Versions: 14

Compression:

Stored size: 1.06 KB

Contents

require_relative '../test_helper'
require 'debugger/xml/vim/control_command_processor'

describe Debugger::Xml::Vim::ControlCommandProcessor do
  include TestDsl

  let(:klass) { Debugger::Xml::Vim::ControlCommandProcessor }
  let(:interface) { Debugger.handler.interface }
  let(:file) { fullpath('jump') }
  let(:context) { stub(frame_binding: stub, stop_reason: nil, thread: stub, thnum: 1, stack_size: 2, dead?: false) }
  subject { klass.new(interface) }
  temporary_change_method_value(Debugger, :handler, Debugger::Xml::Ide::Processor.new(TestInterface.new))

  before do
    Thread.stubs(:stop)
    Debugger.handler.instance_variable_set("@context", context)
    Debugger.handler.instance_variable_set("@file", file)
    Debugger.handler.instance_variable_set("@line", 30)
  end

  it "must send response after executing commands" do
    Debugger::AddBreakpoint.any_instance.stubs(:execute).with()
    Debugger::DeleteBreakpointCommand.any_instance.stubs(:execute).with()
    interface.expects(:send_response)
    enter 'break 5; delete 1'
    subject.process_commands
  end
end

Version data entries

14 entries across 14 versions & 1 rubygems

Version Path
debugger-xml-0.3.3 test/vim/control_command_processor_test.rb
debugger-xml-0.3.2 test/vim/control_command_processor_test.rb
debugger-xml-0.3.1 test/vim/control_command_processor_test.rb
debugger-xml-0.2.0 test/vim/control_command_processor_test.rb
debugger-xml-0.1.9 test/vim/control_command_processor_test.rb
debugger-xml-0.1.8 test/vim/control_command_processor_test.rb
debugger-xml-0.1.7 test/vim/control_command_processor_test.rb
debugger-xml-0.1.6 test/vim/control_command_processor_test.rb
debugger-xml-0.1.5 test/vim/control_command_processor_test.rb
debugger-xml-0.1.4 test/vim/control_command_processor_test.rb
debugger-xml-0.1.3 test/vim/control_command_processor_test.rb
debugger-xml-0.1.2 test/vim/control_command_processor_test.rb
debugger-xml-0.1.1 test/vim/control_command_processor_test.rb
debugger-xml-0.1.0 test/vim/control_command_processor_test.rb