test/test_generated_site.rb in mojombo-jekyll-0.5.1 vs test/test_generated_site.rb in mojombo-jekyll-0.5.2
- old
+ new
@@ -15,15 +15,12 @@
should "insert site.posts into the index" do
assert @index.include?("#{@site.posts.size} Posts")
end
- should "render post.content" do
- latest_post = Dir[source_dir('_posts', '*')].sort.last
- post = Post.new(@site, source_dir, '', File.basename(latest_post))
- post.transform
- assert @index.include?(post.content)
+ should "render latest post's content" do
+ assert @index.include?(@site.posts.last.content)
end
should "hide unpublished posts" do
published = Dir[dest_dir('publish_test/2008/02/02/*.html')].map {|f| File.basename(f)}
@@ -31,8 +28,13 @@
assert_equal "published.html", published.first
end
should "not copy _posts directory" do
assert !File.exist?(dest_dir('_posts'))
+ end
+
+ should "process other static files and generate correct permalinks" do
+ assert File.exists?(dest_dir('/about/index.html'))
+ assert File.exists?(dest_dir('/contacts.html'))
end
end
end