Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse files

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

  • Loading branch information...
commit 8f890cb064675321d506229c104d332aa4856ca6 1 parent 6f6ad00
@parkr parkr authored
View
0  test/source/_posts/2013-03-19-not-a-post.markdown/.gitkeep
No changes.
View
4 test/test_site.rb
@@ -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
Please sign in to comment.
Something went wrong with that request. Please try again.