Sha256: 55be6265fbe7fa65be7a80a0c626a2cbb679ade069811580af3ad9d7f2987a5a

Contents?: true

Size: 501 Bytes

Versions: 2

Compression:

Stored size: 501 Bytes

Contents

require 'spec_helper'

describe Feedjira::Preprocessor do
  it 'returns the xml as parsed by Nokogiri' do
    xml = '<xml></xml>'
    doc = Nokogiri::XML(xml).remove_namespaces!
    processor = Feedjira::Preprocessor.new xml
    escaped = processor.to_xml

    escaped.should eq doc.to_xml
  end

  it 'escapes markup in xhtml content' do
    processor = Feedjira::Preprocessor.new sample_atom_xhtml_feed
    escaped = processor.to_xml

    escaped.split("\n")[26].should match /&lt;p&gt;$/
  end
end

Version data entries

2 entries across 2 versions & 1 rubygems

Version Path
feedjira-1.3.1 spec/feedjira/preprocessor_spec.rb
feedjira-1.3.0 spec/feedjira/preprocessor_spec.rb