Sha256: d42123c8b686ca6ea8985bcd9b2b059cbddfd8ddc77e6f8326669057db13705d
Contents?: true
Size: 810 Bytes
Versions: 1
Compression:
Stored size: 810 Bytes
Contents
require File.dirname(__FILE__) + '/spec_helper' require 'atom/feed' describe Atom::Feed do describe 'extensions' do before(:each) do @feed = Atom::Feed.parse(fixtures('feed-w-ext')) end it 'should preserve namespaces' do @feed.to_s.should =~ /purl/ feed2 = Atom::Feed.new feed2.merge! @feed feed2.to_s.should =~ /purl/ end end before :each do @feed = Atom::Feed.parse(fixtures('contacts-feed')) end describe "to_s" do it "should only have one content element" do result = @feed.to_s result.scan("<content type=").size.should == 1 end end describe "to_xml" do it "should only have one content element" do result = @feed.to_xml REXML::XPath.match(result, "//content").size.should == 1 end end end
Version data entries
1 entries across 1 versions & 1 rubygems
Version | Path |
---|---|
atom-tools-2.0.5 | spec/feed_spec.rb |