Skip to content

Commit

Permalink
failing struct test
Browse files Browse the repository at this point in the history
  • Loading branch information
defunkt committed Feb 23, 2011
1 parent 0aa0071 commit 3367e85
Showing 1 changed file with 8 additions and 0 deletions.
8 changes: 8 additions & 0 deletions test/mustache_test.rb
Expand Up @@ -471,6 +471,14 @@ def indent
template
end

def test_struct
person = Struct.new(:name, :age)
view = Mustache.new
view[:person] = person.new('Marvin', 25)
view.template = '{{#person}}{{name}} is {{age}}{{/person}}'
assert_equal 'Marvin is 25', view.render
end

def test_inherited_attributes
Object.const_set :TestNamespace, Module.new
base = Class.new(Mustache)
Expand Down

0 comments on commit 3367e85

Please sign in to comment.