Sha256: b30cd7269833e25d37c62657fbe17cc5b0c6d3b4ad4bd0adeebe087541c2b63d

Contents?: true

Size: 1.07 KB

Versions: 8

Compression:

Stored size: 1.07 KB

Contents

require 'spec_helper'

describe 'SitemapGenerator::Builder::SitemapIndexFile' do
  before :each do
    @loc = SitemapGenerator::SitemapLocation.new(:filename => 'sitemap_index.xml.gz', :public_path => '/public/', :sitemaps_path => 'test/', :host => 'http://example.com/')
    @s = SitemapGenerator::Builder::SitemapIndexFile.new(@loc)
  end

  it "should return the URL" do
    @s.location.url.should == 'http://example.com/test/sitemap_index.xml.gz'
  end

  it "should return the path" do
    @s.location.path.should == '/public/test/sitemap_index.xml.gz'
  end

  it "should be empty" do
    @s.empty?.should be_true
    @s.link_count.should == 0
  end

  it "should not have a last modification data" do
    @s.lastmod.should be_nil
  end

  it "should not be finalized" do
    @s.finalized?.should be_false
  end

  it "filename should default to sitemap_index" do
    @s.location.filename.should == 'sitemap_index.xml.gz'
  end

  it "should have a default namer" do
    @s = SitemapGenerator::Builder::SitemapIndexFile.new
    @s.location.filename.should == 'sitemap_index.xml.gz'
  end
end

Version data entries

8 entries across 8 versions & 1 rubygems

Version Path
sitemap_generator-4.0.alpha spec/sitemap_generator/builder/sitemap_index_file_spec.rb
sitemap_generator-3.4 spec/sitemap_generator/builder/sitemap_index_file_spec.rb
sitemap_generator-3.3 spec/sitemap_generator/builder/sitemap_index_file_spec.rb
sitemap_generator-3.2.1 spec/sitemap_generator/builder/sitemap_index_file_spec.rb
sitemap_generator-3.2 spec/sitemap_generator/builder/sitemap_index_file_spec.rb
sitemap_generator-3.1.1 spec/sitemap_generator/builder/sitemap_index_file_spec.rb
sitemap_generator-3.1.0 spec/sitemap_generator/builder/sitemap_index_file_spec.rb
sitemap_generator-3.0.0 spec/sitemap_generator/builder/sitemap_index_file_spec.rb