Sha256: 703e1b4896351d958fd4bb2e312a36bd16957e4baec3933389b489d11fcdee91

Contents?: true

Size: 1.46 KB

Versions: 33

Compression:

Stored size: 1.46 KB

Contents

Feature: Aliasing tags

  Scenario: Simple alias
    Given a file named "example_taglib.dryml" with:
      """
      <def tag="help-link" attrs="file">
        <a class="help" href="/help/#{file}.html" param="default"/>
      </def>

      <def tag="help" alias-of="help-link" />
      """
    And a file named "example.dryml" with:
      """
      <help file="intro">Intro Help</help>
      """
    When I include the taglib "example_taglib"
    And I render "example.dryml"
    Then the output DOM should be:
      """
      <a class="help" href="/help/intro.html">Intro Help</a>
      """

  Scenario: Alias before extend
    Given a file named "example_taglib.dryml" with:
      """
      <def tag="help-link" attrs="file">
        <a class="help" href="/help/#{file}.html" param="default"/>
      </def>

      <def tag="basic-help" alias-of="help-link" />

      <extend tag="help-link">
        <old-help-link merge>
          <img src="/images/logo.png" /><do param="default" />
        </old-help-link>
      </extend>
      """
    And a file named "example.dryml" with:
      """
      <basic-help file="basic">Basic Help</basic-help>
      <help-link file="intro">Intro Help</help-link>
      """
    When I include the taglib "example_taglib"
    And I render "example.dryml"
    Then the output DOM should be:
      """
      <a class="help" href="/help/basic.html">Basic Help</a>
      <a class="help" href="/help/intro.html"><img src="/images/logo.png" />Intro Help</a>
      """

Version data entries

33 entries across 33 versions & 1 rubygems

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