Sha256: f09a27fb00d964d3b4468281f5d670114826e4818dcf7be79f0cc4d0a18c7e0c

Contents?: true

Size: 530 Bytes

Versions: 44

Compression:

Stored size: 530 Bytes

Contents

describe Dap::Input::InputJSON do
  describe '.read_record' do
    context 'decoding input json' do
      let(:file_object) { double("fake file") }
      let(:input) { described_class.new(['data']) }
      let(:record) { input.read_record }
      it 'parses values starting with a colon (:) as a string' do
        allow(File).to receive(:open).with('data', 'rb').and_return(file_object)
        allow(file_object).to receive(:readline).and_return('{"a": ":b"}')
        expect(record['a']).to eq(":b")
      end
    end
  end
end

Version data entries

44 entries across 44 versions & 1 rubygems

Version Path
dap-0.0.19 spec/dap/input/json_spec.rb
dap-0.0.18 spec/dap/input/json_spec.rb
dap-0.0.17 spec/dap/input/json_spec.rb
dap-0.0.16 spec/dap/input/json_spec.rb