Permalink
Browse files

Add a test about >{partial} rendering.

  • Loading branch information...
blambeau committed Aug 8, 2016
1 parent 732b5d3 commit 6e45f0c2ae2c8ff27accfab42e4af8ce6d1ff051
Showing with 11 additions and 0 deletions.
  1. +4 −0 spec/fixtures/templates/front_matter.wlang
  2. +7 −0 spec/integration/sinatra/test_partials.rb
@@ -0,0 +1,4 @@
+---
+foo: bar
+---
+Hello ${who} ${foo}!
@@ -19,6 +19,9 @@ def accessible; settings.accessible; end
get '/internal' do
wlang ">{internal_partial}", :locals => {:who => "sinatra"}
end
+ get '/front-matter' do
+ wlang ">{front_matter}", :locals => {:who => "sinatra"}
+ end
end
}
@@ -32,4 +35,8 @@ def accessible; settings.accessible; end
last_response.body.should eq("Hello sinatra!")
end
+ it 'renders with front matters correcty' do
+ get '/front-matter'
+ last_response.body.should eq("Hello sinatra bar!")
+ end
end

0 comments on commit 6e45f0c

Please sign in to comment.