File tree Expand file tree Collapse file tree 2 files changed +43
-3
lines changed Expand file tree Collapse file tree 2 files changed +43
-3
lines changed Original file line number Diff line number Diff line change 1
- - version : 2.7.0
2
- date : 2018-01-01
3
- post : /en/news/2018/01/01/ok/
Original file line number Diff line number Diff line change
1
+ # frozen_string_literal: true
2
+
3
+ require "helper"
4
+ require "linter"
5
+
6
+
7
+ describe Linter do
8
+
9
+ before do
10
+ chdir_tempdir
11
+
12
+ @ok = "Checking markdown files... ok\n "
13
+ end
14
+
15
+ after do
16
+ teardown_tempdir
17
+ end
18
+
19
+ it "checks ok valid release data with corresponding post" do
20
+ releases_content = <<~YAML
21
+ - version: 2.7.0
22
+ date: 2018-01-01
23
+ post: /en/news/2018/01/01/post/
24
+ YAML
25
+
26
+ post_content = <<~POST
27
+ ---
28
+ layout: news_post
29
+ title: "Post"
30
+ author: "stomar"
31
+ translator:
32
+ date: 2018-01-01 12:00:00 +0000
33
+ lang: en
34
+ ---
35
+
36
+ Content
37
+ POST
38
+
39
+ create_file ( "_data/releases.yml" , releases_content )
40
+ create_file ( "en/news/_posts/2018-01-01-post.md" , post_content )
41
+ _ ( linter_output ) . must_equal @ok
42
+ end
43
+ end
You can’t perform that action at this time.
0 commit comments