From 15be2d26689e983f6d8c916b0df46465c4e09796 Mon Sep 17 00:00:00 2001 From: Daniel Barber Date: Sat, 16 Nov 2019 22:10:41 -0500 Subject: [PATCH] Autoload parser --- lib/micropub.rb | 2 ++ test/requests/create_post_test.rb | 4 ++-- 2 files changed, 4 insertions(+), 2 deletions(-) diff --git a/lib/micropub.rb b/lib/micropub.rb index a49cf8a..0879e41 100644 --- a/lib/micropub.rb +++ b/lib/micropub.rb @@ -3,4 +3,6 @@ module Micropub autoload :Github, File.expand_path('micropub/github.rb', __dir__) autoload :Indieauth, File.expand_path('micropub/indieauth.rb', __dir__) autoload :Post, File.expand_path('micropub/models/post.rb', __dir__) + autoload :PostJSONParser, + File.expand_path('micropub/models/post_json_parser.rb', __dir__) end diff --git a/test/requests/create_post_test.rb b/test/requests/create_post_test.rb index f238ff6..754ad23 100644 --- a/test/requests/create_post_test.rb +++ b/test/requests/create_post_test.rb @@ -62,7 +62,7 @@ describe "create post" do it "creates a post with JSON" do post_json = { - type: "h-entry", + type: ["h-entry"], properties: { content: ["Hello, World!"], category: ["one", "two", "three"], @@ -79,7 +79,7 @@ describe "create post" do it "creates a post with JSON and HTML content" do post_json = { - type: "h-entry", + type: ["h-entry"], properties: { content: { html: ["

Hello, World!

"] }, category: ["one", "two", "three"],