Allow documents to set published in front matter

This commit is contained in:
Alfred Xing
2014-11-29 10:51:30 -08:00
parent f3a274377a
commit 7655b533c9
3 changed files with 47 additions and 1 deletions

View File

@@ -237,6 +237,34 @@ class TestDocument < Test::Unit::TestCase
end
end
context "documents in a collection" do
setup do
@site = Site.new(Jekyll.configuration({
"collections" => {
"slides" => {
"output" => true
}
},
"source" => source_dir,
"destination" => dest_dir
}))
@site.process
@files = @site.collections["slides"].docs
end
context "without output overrides" do
should "be output according to collection defaults" do
assert_not_nil @files.find { |doc| doc.relative_path == "_slides/example-slide-4.html" }
end
end
context "with output overrides" do
should "be output according its front matter" do
assert_nil @files.find { |doc| doc.relative_path == "_slides/non-outputted-slide.html" }
end
end
end
context "a static file in a collection" do
setup do
@site = Site.new(Jekyll.configuration({