diff --git a/test/lib/blog/parser_test.exs b/test/lib/blog/parser_test.exs index e6887e7..cc4524a 100644 --- a/test/lib/blog/parser_test.exs +++ b/test/lib/blog/parser_test.exs @@ -2,7 +2,7 @@ defmodule Jol.Blog.ParserTest do use ExUnit.Case, async: true alias Jol.Blog.Parser - test "parses attrs from zola-style posts" do + setup do content = """ +++ title = "test post" @@ -16,7 +16,11 @@ defmodule Jol.Blog.ParserTest do Body! """ - {_attrs, body} = Parser.parse("/fake/filename", content) + {:ok, content: content} + end + + test "parses attrs from zola-style posts", post do + {_attrs, body} = Parser.parse("/fake/filename", post.content) assert body == "Body!" end end