Feature: Polymorphic tags Scenario: Using a polymorphic tag Given a file named "example_taglib.dryml" with: """

<%= h this.to_s %>

<%= this.title %> <%= this.name %> """ And a file named "example.dryml" with: """ """ 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: """

A Blog Post

Nobody
""" Scenario: Using a polymorphic tag for a subclass Given a file named "example_taglib.dryml" with: """

<%= h this.to_s %>

<%= this.title %> <%= this.name %> """ And a file named "example.dryml" with: """ """ When I include the taglib "example_taglib" And the current context is a special blog post And I render "example.dryml" Then the output DOM should be: """

A Blog Post

Nobody
""" Scenario: Using a polymorphic tag for a subclass with a customized tag (fails) issue 779 / https://github.com/tablatom/hobo/commit/aceb7afc384287b19e59ebb94020a2c509143c76 Given a file named "example_taglib.dryml" with: """

<%= h this.to_s %>

<%= this.title %> <%= this.name %> """ And a file named "example.dryml" with: """ """ When I include the taglib "example_taglib" And the current context is a special blog post And I render "example.dryml" Then the output DOM should be: """

A Blog Post

Nobody
""" Scenario: using call-tag to call a polymorphic tag Given a file named "example_taglib.dryml" with: """

<%= h this.to_s %>

<%= this.title %> <%= this.name %> """ And a file named "example.dryml" with: """ """ 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: """

A Blog Post

Nobody
""" Scenario: using call-tag to call a polymorphic tag with an explicit type (fails) Given a file named "example_taglib.dryml" with: """

<%= h this.to_s %>

<%= this.title %> <%= this.name %> """ And a file named "example.dryml" with: """ """ When I include the taglib "example_taglib" And the current context is a special blog post And I render "example.dryml" Then the output DOM should be: """

A Blog Post

Nobody
"""