Navigation Menu

Skip to content

Commit

Permalink
spec out liquid yield support
Browse files Browse the repository at this point in the history
  • Loading branch information
rtomayko committed Dec 7, 2009
1 parent 1cb1ea0 commit 83d0dab
Showing 1 changed file with 9 additions and 0 deletions.
9 changes: 9 additions & 0 deletions test/spec_tilt_liquid_template.rb
Expand Up @@ -57,6 +57,15 @@ class ExampleIgnoredLiquidScope
scope = ExampleIgnoredLiquidScope.new
template.render(scope).should.equal "Whisky"
end

it "supports yield in templates" do
template =
Tilt::LiquidTemplate.new {
'Beer is {{ yield }} but Whisky is {{ content }}ter.'
}
template.render({}) { 'wet' }.
should.equal "Beer is wet but Whisky is wetter."
end
end

rescue LoadError => boom
Expand Down

0 comments on commit 83d0dab

Please sign in to comment.