Sha256: 4221d7a9316ea9472a1e3b6eda34e5d3a876e7fe0b8cb02c6cf1366445bc25a2

Contents?: true

Size: 1.17 KB

Versions: 14

Compression:

Stored size: 1.17 KB

Contents

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

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

  before { Thread.stubs(:stop) }

  let(:klass) { Debugger::Xml::Vim::Processor }
  let(:interface) { TestInterface.new }
  let(:breakpoint) { stub }
  let(:context) { stub(thread: nil, stop_reason: nil, thnum: 1, stack_size: 2) }
  let(:file) { fullpath('jump') }
  subject { klass.new(interface) }

  describe "#at_line" do
    it "must send response" do
      processor = stub
      processor.stubs(:process_command).with("where")
      processor.stubs(:process_command).with("var local")
      Debugger::Xml::Vim::ControlCommandProcessor.stubs(:new).with(interface).returns(processor)
      interface.expects(:send_response)
      subject.at_line(context, file, 30)
    end

    it "must process additional commands" do
      processor = stub
      processor.expects(:process_command).with("where")
      processor.expects(:process_command).with("var local")
      Debugger::Xml::Vim::ControlCommandProcessor.expects(:new).with(interface).returns(processor)
      interface.stubs(:send_response)
      subject.at_line(context, file, 30)
    end
  end
end

Version data entries

14 entries across 14 versions & 1 rubygems

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