mustache / spec

The Mustache spec.
MIT License
364 stars 71 forks source link

Clarification on truthiness of hashes #80

Closed estan closed 10 years ago

estan commented 10 years ago

Hi folks,

I'm still doing some work on fixing the spec conformance of qt-mustache.

The "Sections" case in inverted.yml is:

  - name: Context
    desc: Objects and hashes should behave like truthy values.
    data: { context: { name: 'Joe' } }
    template: '"{{^context}}Hi {{name}}.{{/context}}"'
    expected: '""'

I may be thick, but the description says a hash should behave as a truthy values, but the testcase then expects its inverse to not be rendered? By the description, shouldn't the context tag be rendered here?

I'm probably missing something, but please enlighten me :)

estan commented 10 years ago

Uhm. I'm retarded. Closing.