Sha256: d947b103357706840f7b56126ed79c134b4014ba949eadb6feaf3ac40ebece8e

Contents?: true

Size: 1.66 KB

Versions: 1

Compression:

Stored size: 1.66 KB

Contents

Feature: YAML Front Matter
  In order to specific options and data inline

  Scenario: Rendering html (yaml)
    Given the Server is running at "frontmatter-app"
    When I go to "/front-matter-auto.html"
    Then I should see "<h1>This is the title</h1>"
    Then I should not see "---"
    When I go to "/front-matter.html"
    Then I should see "<h1>This is the title</h1>"
    Then I should not see "---"
    When I go to "/front-matter-2.php"
    Then I should see "<h1>This is the title</h1>"
    Then I should see "<?php"
    Then I should not see "---"
    
  Scenario: Rendering html (json)
    Given the Server is running at "frontmatter-app"
    When I go to "/json-front-matter-auto.html"
    Then I should see "<h1>This is the title</h1>"
    Then I should not see "{"
    When I go to "/json-front-matter.html"
    Then I should see "<h1>This is the title</h1>"
    Then I should not see "{"
    When I go to "/json-front-matter-2.php"
    Then I should see "<h1>This is the title</h1>"
    Then I should see "<?php"
    Then I should not see "{"

  Scenario: A template changes frontmatter during preview
    Given the Server is running at "frontmatter-app"
    And the file "source/front-matter-change.html.erb" has the contents
      """
      ---
      title: Hello World
      layout: false
      ---
      <%= data.page.title %>
      """
    When I go to "/front-matter-change.html"
    Then I should see "Hello World"
    And the file "source/front-matter-change.html.erb" has the contents
      """
      ---
      title: Hola Mundo
      layout: false
      ---
      <%= data.page.title %>
      """
    When I go to "/front-matter-change.html"
    Then I should see "Hola Mundo"

Version data entries

1 entries across 1 versions & 1 rubygems

Version Path
middleman-core-3.0.0.beta.3 features/front-matter.feature