Sha256: 9d5ba3797e83593daf7252dd4a18e1d8669aa7c4dd16f742905ea202ec41e5b8

Contents?: true

Size: 647 Bytes

Versions: 1

Compression:

Stored size: 647 Bytes

Contents

require "spec_helper"

RSpec.describe Burlap::Array do
  describe "#to_burlap" do
    subject(:burlap) { array.to_burlap }

    let(:array) { described_class["some", mock_obj] }
    let(:mock_obj) { instance_double(Object, to_burlap: "<mock>my stuff here</mock>") }

    it "returns a string" do
      expect(burlap).to be_a_kind_of(String)
    end

    it "is correct" do
      xml_string = <<-XML
      <list>
        <type></type>
        <length>2</length>
        <string>some</string>
        <mock>my stuff here</mock>
      </list>
      XML

      format_xml_as_burlap(xml_string)
      expect(burlap).to eq(xml_string)
    end
  end
end

Version data entries

1 entries across 1 versions & 1 rubygems

Version Path
burlap-1.0.0 spec/burlap/array_spec.rb