File: drafts.feature

package info (click to toggle)
jekyll 3.9.0%2Bdfsg-3
  • links: PTS, VCS
  • area: main
  • in suites: bullseye
  • size: 4,604 kB
  • sloc: ruby: 15,325; javascript: 1,455; sh: 214; xml: 29; makefile: 7
file content (50 lines) | stat: -rw-r--r-- 2,224 bytes parent folder | download | duplicates (6)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
Feature: Draft Posts
  As a hacker who likes to blog
  I want to be able to preview drafts locally
  In order to see if they look alright before publishing

  Scenario: Preview a draft
    Given I have a configuration file with "permalink" set to "none"
    And I have a _drafts directory
    And I have the following draft:
      | title  | date       | layout  | content        |
      | Recipe | 2009-03-27 | default | Not baked yet. |
    When I run jekyll build --drafts
    Then I should get a zero exit status
    And the _site directory should exist
    And I should see "Not baked yet." in "_site/recipe.html"

  Scenario: Don't preview a draft
    Given I have a configuration file with "permalink" set to "none"
    And I have an "index.html" page that contains "Totally index"
    And I have a _drafts directory
    And I have the following draft:
      | title  | date       | layout  | content        |
      | Recipe | 2009-03-27 | default | Not baked yet. |
    When I run jekyll build
    Then I should get a zero exit status
    And the _site directory should exist
    And the "_site/recipe.html" file should not exist

  Scenario: Don't preview a draft that is not published
    Given I have a configuration file with "permalink" set to "none"
    And I have an "index.html" page that contains "Totally index"
    And I have a _drafts directory
    And I have the following draft:
      | title  | date       | layout  | published | content        |
      | Recipe | 2009-03-27 | default | false     | Not baked yet. |
    When I run jekyll build --drafts
    Then I should get a zero exit status
    And the _site directory should exist
    And the "_site/recipe.html" file should not exist

  Scenario: Use page.path variable
    Given I have a configuration file with "permalink" set to "none"
    And I have a _drafts directory
    And I have the following draft:
      | title  | date       | layout | content                    |
      | Recipe | 2009-03-27 | simple | Post path: {{ page.path }} |
    When I run jekyll build --drafts
    Then I should get a zero exit status
    And the _site directory should exist
    And I should see "Post path: _drafts/recipe.markdown" in "_site/recipe.html"