Sha256: 93c7d9ed533bec7c430da2c6f353d3ff2cf8c296b236f523364ed3c7e425d8bd

Contents?: true

Size: 1.47 KB

Versions: 33

Compression:

Stored size: 1.47 KB

Contents

Feature: Wrapping content

  Background:
    Given a file named "example_taglib.dryml" with:
      """
      <def tag="card">
        <div class="card" merge-attrs>
          <h3 param="heading"><%= this.name %></h3>
          <div param="body"></div>
        </div>
      </def>
      """

  Scenario: wrapping content inside a parameter
    Given a file named "example.dryml" with:
      """
      <card>
        <heading:><a href="#{this.url}"><param-content for="heading"/></a></heading:>
      </card>
      """
    When I include the taglib "example_taglib"
    And the current context is a blog post
    And I render "example.dryml"
    Then the output DOM should be:
      """
      <div class="card">
        <h3 class="heading"><a href="/blog_posts/1">A Blog Post</a></h3>
        <div class="body"></div>
      </div>
      """

  Scenario: wrapping content outside a parameter
    Given a file named "example.dryml" with:
      """
      <card>
        <heading: replace>
          <div class="header">
            <heading: restore/>
            <p>ID: <%= this.id %></p>
          </div>
        </heading:>
      </card>
      """
    When I include the taglib "example_taglib"
    And the current context is a blog post
    And I render "example.dryml"
    Then the output DOM should be:
      """
      <div class="card">
        <div class="header">
          <h3 class="heading">A Blog Post</h3>
          <p>ID: 1</p>
        </div>
        <div class="body"></div>
      </div>
      """

Version data entries

33 entries across 33 versions & 1 rubygems

Version Path
dryml-2.2.6 features/cookbook/11_wrapping_content.feature
dryml-2.2.5 features/cookbook/11_wrapping_content.feature
dryml-2.2.4 features/cookbook/11_wrapping_content.feature
dryml-2.2.3 features/cookbook/11_wrapping_content.feature
dryml-2.2.2 features/cookbook/11_wrapping_content.feature
dryml-2.2.1 features/cookbook/11_wrapping_content.feature
dryml-2.2.0 features/cookbook/11_wrapping_content.feature
dryml-2.1.2 features/cookbook/11_wrapping_content.feature
dryml-2.1.1 features/cookbook/11_wrapping_content.feature
dryml-2.1.0 features/cookbook/11_wrapping_content.feature
dryml-2.1.0.pre4 features/cookbook/11_wrapping_content.feature
dryml-2.1.0.pre3 features/cookbook/11_wrapping_content.feature
dryml-2.1.0.pre2 features/cookbook/11_wrapping_content.feature
dryml-2.1.0.pre1 features/cookbook/11_wrapping_content.feature
dryml-2.0.1 features/cookbook/11_wrapping_content.feature
dryml-2.0.0 features/cookbook/11_wrapping_content.feature
dryml-2.0.0.pre10 features/cookbook/11_wrapping_content.feature
dryml-2.0.0.pre9 features/cookbook/11_wrapping_content.feature
dryml-2.0.0.pre8 features/cookbook/11_wrapping_content.feature
dryml-2.0.0.pre7 features/cookbook/11_wrapping_content.feature