File: cache.feature

package info (click to toggle)
jekyll 4.4.1%2Bdfsg-2
  • links: PTS, VCS
  • area: main
  • in suites: forky, sid
  • size: 6,488 kB
  • sloc: ruby: 16,736; javascript: 1,455; sh: 216; xml: 29; makefile: 9
file content (46 lines) | stat: -rw-r--r-- 2,092 bytes parent folder | download | duplicates (3)
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
Feature: Cache
  As a developer who likes to create plugins
  I want to be able to cache certain aspects across multiple builds
  And retrieve the cached aspects when needed

  Scenario: Default Cache directory
    Given I have an "index.md" page that contains "{{ site.title }}"
    And I have a configuration file with "title" set to "Hello World"
    When I run jekyll build
    Then I should get a zero exit status
    And the .jekyll-cache directory should exist
    And the .jekyll-cache/Jekyll/Cache/Jekyll--Cache directory should exist
    And the _site directory should exist
    And I should see "<p>Hello World</p>" in "_site/index.html"

  Scenario: Custom Cache directory
    Given I have an "index.md" page that contains "{{ site.title }}"
    And I have a configuration file with:
      | key       | value       |
      | title     | Hello World |
      | cache_dir | .foo-cache  |
    When I run jekyll build
    Then I should get a zero exit status
    And the .foo-cache directory should exist
    And the .foo-cache/Jekyll/Cache/Jekyll--Cache directory should exist
    But the .jekyll-cache directory should not exist
    And the _site directory should exist
    And I should see "<p>Hello World</p>" in "_site/index.html"

  Scenario: Disk usage in safe mode
    Given I have an "index.md" page that contains "{{ site.title }}"
    And I have a configuration file with "title" set to "Hello World"
    When I run jekyll build --safe
    Then I should get a zero exit status
    But the .jekyll-cache directory should not exist
    And the _site directory should exist
    And I should see "<p>Hello World</p>" in "_site/index.html"

  Scenario: Disabling disk usage in non-safe mode
    Given I have an "index.md" page that contains "{{ site.title }}"
    And I have a configuration file with "title" set to "Hello World"
    When I run jekyll build --disable-disk-cache
    Then I should get a zero exit status
    And the _site directory should exist
    And I should see "<p>Hello World</p>" in "_site/index.html"
    But the .jekyll-cache directory should not exist