Permalink
Browse files

Move clean method test into the clean method context

  • Loading branch information...
1 parent 5167bc5 commit d51559e8511dccf517ebf338f6173d098c06e2ba @alexrabarts alexrabarts committed Mar 12, 2009
Showing with 7 additions and 7 deletions.
  1. +7 −7 test/big_sitemap_test.rb
View
@@ -35,13 +35,6 @@ def teardown
assert !File.exists?(third_sitemaps_model_file), "#{third_sitemaps_model_file} does not exist"
end
- should 'clean all sitemap files' do
- generate_sitemap_files
- assert Dir.entries(sitemaps_dir).size > 2, "#{sitemaps_dir} is not empty" # ['.', '..'].size == 2
- @sitemap.clean
- assert_equal 2, Dir.entries(sitemaps_dir).size, "#{sitemaps_dir} is empty"
- end
-
context 'Sitemap index file' do
should 'contain one sitemapindex element' do
generate_sitemap_files
@@ -135,6 +128,13 @@ def teardown
create_sitemap
assert_equal BigSitemap, @sitemap.clean.class
end
+
+ should 'clean all sitemap files' do
+ generate_sitemap_files
+ assert Dir.entries(sitemaps_dir).size > 2, "#{sitemaps_dir} is not empty" # ['.', '..'].size == 2
+ @sitemap.clean
+ assert_equal 2, Dir.entries(sitemaps_dir).size, "#{sitemaps_dir} is empty"
+ end
end
context 'generate method' do

0 comments on commit d51559e

Please sign in to comment.