spec/jekyll-sitemap_spec.rb in jekyll-sitemap-0.8.0 vs spec/jekyll-sitemap_spec.rb in jekyll-sitemap-0.8.1
- old
+ new
@@ -27,9 +27,14 @@
it "creates a sitemap.xml file" do
expect(File.exist?(dest_dir("sitemap.xml"))).to be_truthy
end
+ it "doesn't have multiple new lines or trailing whitespace" do
+ expect(contents).to_not match /\s+\n/
+ expect(contents).to_not match /\n{2,}/
+ end
+
it "puts all the pages in the sitemap.xml file" do
expect(contents).to match /<loc>http:\/\/example\.org\/<\/loc>/
expect(contents).to match /<loc>http:\/\/example\.org\/some-subfolder\/this-is-a-subpage\.html<\/loc>/
end