Permalink
Browse files

Fix tests that fail due to having a directory that looks like a post

  • Loading branch information...
1 parent 6f6ad00 commit 8f890cb064675321d506229c104d332aa4856ca6 @parkr parkr committed Mar 19, 2013
Showing with 3 additions and 1 deletion.
  1. 0 test/source/_posts/2013-03-19-not-a-post.markdown/.gitkeep
  2. +3 −1 test/test_site.rb
View
@@ -161,6 +161,7 @@ def generate(site)
should "read posts" do
@site.read_posts('')
posts = Dir[source_dir('_posts', '*')]
+ posts.delete_if { |post| File.directory?(post) }
assert_equal posts.size - 1, @site.posts.size
end
@@ -169,9 +170,10 @@ def generate(site)
@site.process
posts = Dir[source_dir("**", "_posts", "*")]
+ posts.delete_if { |post| File.directory?(post) }
categories = %w(bar baz category foo z_category publish_test win).sort
- assert_equal posts.size - 1, @site.posts.size
+ assert_equal posts.size, @site.posts.size
assert_equal categories, @site.categories.keys.sort
assert_equal 4, @site.categories['foo'].size
end

0 comments on commit 8f890cb

Please sign in to comment.