Sha256: c1db0f9fda421fb32379bcd364abdb4a7baacea85ae4ffba9f45ee58bf7caad9
Contents?: true
Size: 803 Bytes
Versions: 21
Compression:
Stored size: 803 Bytes
Contents
require 'spec_helper' describe SitemapGenerator::Builder::SitemapIndexUrl do let(:index) { SitemapGenerator::Builder::SitemapIndexFile.new( :sitemaps_path => 'sitemaps/', :host => 'http://test.com', :filename => 'sitemap_index.xml.gz' ) } let(:url) { SitemapGenerator::Builder::SitemapUrl.new(index) } it "should return the correct url" do url[:loc].should == 'http://test.com/sitemaps/sitemap_index.xml.gz' end it "should use the host from the index" do host = 'http://myexample.com' index.location.expects(:host).returns(host) url[:host].should == host end it "should use the public path for the link" do path = '/path' index.location.expects(:path_in_public).returns(path) url[:loc].should == 'http://test.com/path' end end
Version data entries
21 entries across 21 versions & 3 rubygems