require File.join(File.dirname(__FILE__), 'test_helper') class SitemapTest < ActiveSupport::TestCase context "Sitemap" do setup do create_posts load_sitemap end should "create sitemap" do Crawlable::Sitemap.write("test/sitemap.xml") assert File.exists?("test/sitemap.xml.gz") end teardown do File.delete("test/sitemap.xml.gz") if File.exists?("test/sitemap.xml.gz") end end end