Sha256: 93067465b0d42d82157f0cf355c015de9ddfbbf9d35297bf55227f2d1fec2316

Contents?: true

Size: 614 Bytes

Versions: 14

Compression:

Stored size: 614 Bytes

Contents

require 'spec_helper'

describe "SitemapGenerator::FileAdapter" do
  let(:location) { SitemapGenerator::SitemapLocation.new }
  let(:adapter)  { SitemapGenerator::FileAdapter.new }

  describe "write" do
    it "should gzip contents if filename ends in .gz" do
      adapter.expects(:gzip).once
      location.stubs(:filename).returns('sitemap.xml.gz')
      adapter.write(location, 'data')
    end

    it "should not gzip contents if filename does not end in .gz" do
      adapter.expects(:plain).once
      location.stubs(:filename).returns('sitemap.xml')
      adapter.write(location, 'data')
    end
  end
end

Version data entries

14 entries across 14 versions & 3 rubygems

Version Path
sitemap_generator-5.2.0 spec/sitemap_generator/file_adaptor_spec.rb
sitemap_generator-5.1.0 spec/sitemap_generator/file_adaptor_spec.rb
sitemap_generator-5.0.5 spec/sitemap_generator/file_adaptor_spec.rb
ftbpro_sitemap_generator-5.0.8 spec/sitemap_generator/file_adaptor_spec.rb
sitemap_generator_ftbpro-5.0.6 spec/sitemap_generator/file_adaptor_spec.rb
sitemap_generator_ftbpro-5.0.5 spec/sitemap_generator/file_adaptor_spec.rb
sitemap_generator_ftbpro-5.0.4 spec/sitemap_generator/file_adaptor_spec.rb
sitemap_generator-5.0.4 spec/sitemap_generator/file_adaptor_spec.rb
sitemap_generator-5.0.3 spec/sitemap_generator/file_adaptor_spec.rb
sitemap_generator-5.0.2 spec/sitemap_generator/file_adaptor_spec.rb
sitemap_generator-5.0.1 spec/sitemap_generator/file_adaptor_spec.rb
sitemap_generator-5.0.0 spec/sitemap_generator/file_adaptor_spec.rb
sitemap_generator-5.0.0.beta1 spec/sitemap_generator/file_adaptor_spec.rb
sitemap_generator-5.0.0.beta spec/sitemap_generator/file_adaptor_spec.rb