File: theme_configuration.feature

package info (click to toggle)
jekyll 4.4.1%2Bdfsg-3
  • links: PTS, VCS
  • area: main
  • in suites: forky, sid
  • size: 6,504 kB
  • sloc: ruby: 16,738; javascript: 1,455; sh: 216; xml: 29; makefile: 9
file content (36 lines) | stat: -rw-r--r-- 1,748 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
Feature: Bundling Config file with Theme gems
  As a web developer who likes to share my expertise
  I want to be able to pre-configure my gemified theme
  In order to make it easier for other Jekyllites to use my theme

  Scenario: Easy onboarding with a pre-configured theme
    Given I have a configuration file with "theme" set to "test-theme"
    And I have an "index.md" page that contains "{{ site.test_theme.skin }}"
    When I run jekyll build
    Then I should get a zero exit status
    And the _site directory should exist
    And I should see "aero" in "_site/index.html"

  Scenario: Disabling import of theme configuration entirely
    Given I have a configuration file with:
      | key                 | value      |
      | theme               | test-theme |
      | ignore_theme_config | true       |
    And I have an "index.md" page that contains "{{ site.test_theme.skin }}"
    When I run jekyll build
    Then I should get a zero exit status
    And the _site directory should exist
    And I should not see "aero" in "_site/index.html"

  Scenario: A pre-configured theme with valid config file overriding Jekyll defaults
    Given I have a configuration file with "theme" set to "test-theme"
    And I have an "index.md" page that contains "{{ site.baseurl }}"
    And I have a node_modules directory
    And I have a "node_modules/alert.js" file that contains "alert('foo');"
    When I run jekyll build
    Then I should get a zero exit status
    And the _site directory should exist
    And the "_site/index.html" file should exist
    But the "_site/node_modules/alert.js" file should not exist
    And the "_site/extras/banner.html" file should not exist
    And I should not see "/test-theme" in "_site/index.html"