spec/lib/crawler/data/crawl_result/sitemap_spec.rb [75:98]:
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
          ]
        end

        it 'should not return any errors' do
          expect(result[:error]).to be_nil
        end
      end

      #---------------------------------------------------------------------------------------------
      context 'containing corrupted XML' do
        let(:sitemap_content) { '>>>>blergh!%&<<<<' }

        it 'should return an empty set of URLs' do
          expect(sitemap_links).to be_empty
        end

        it 'should return an error explaining the problem' do
          expect(result[:error]).to match(/Failed to parse sitemap/)
        end

        context 'where a part of the XML is valid' do
          let(:sitemap_content) do
            <<~XML
              <?xml version="1.0" encoding="UTF-8"?>
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -



spec/lib/crawler/data/crawl_result/sitemap_spec.rb [207:230]:
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
          ]
        end

        it 'should not return any errors' do
          expect(result[:error]).to be_nil
        end
      end

      #---------------------------------------------------------------------------------------------
      context 'containing corrupted XML' do
        let(:sitemap_content) { '>>>>blergh!%&<<<<' }

        it 'should return an empty set of URLs' do
          expect(sitemap_links).to be_empty
        end

        it 'should return an error explaining the problem' do
          expect(result[:error]).to match(/Failed to parse sitemap/)
        end

        context 'where a part of the XML is valid' do
          let(:sitemap_content) do
            <<~XML
              <?xml version="1.0" encoding="UTF-8"?>
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -



