diff --git a/spec/spec_helper.rb b/spec/spec_helper.rb index c6c2a77..a391dd0 100644 --- a/spec/spec_helper.rb +++ b/spec/spec_helper.rb @@ -26,8 +26,10 @@ def page(options={}) end def post(options={}) - page = Jekyll::Post.new site, CONFIG_DEFAULTS["source"], "", "2015-01-01-post.md" - page.data = options + filename = File.expand_path("2015-01-01-post.md", CONFIG_DEFAULTS["source"]) + config = { :site => site, :collection => site.collections["posts"] } + page = Jekyll::Document.new filename, config + page.merge_data!(options) page end