Tests for #477
This commit is contained in:
parent
4ea2f6f7ed
commit
5071a2c15d
|
@ -48,3 +48,17 @@ Feature: Custom layouts
|
|||
Then I should see "Custom Layout"
|
||||
When I go to "/custom-layout-dir/index.html"
|
||||
Then I should see "Custom Layout"
|
||||
|
||||
Scenario: Setting layout inside a matching page block
|
||||
Given the Server is running at "page-helper-layout-block-app"
|
||||
When I go to "/index.html"
|
||||
Then I should see "Hello"
|
||||
And I should see "World"
|
||||
When I go to "/path/child.html"
|
||||
Then I should see "Alt"
|
||||
And I should see "Child"
|
||||
And I should not see "Hello"
|
||||
When I go to "/path/index.html"
|
||||
Then I should see "Alt"
|
||||
And I should see "Monde"
|
||||
And I should not see "Hello"
|
|
@ -0,0 +1,6 @@
|
|||
page "/path/*", :layout => "alt"
|
||||
|
||||
# Doesn't work, and shouldn't
|
||||
# page "/path/*" do
|
||||
# set :layout, "alt"
|
||||
# end
|
|
@ -0,0 +1 @@
|
|||
World
|
|
@ -0,0 +1,3 @@
|
|||
Alt
|
||||
|
||||
<%= yield %>
|
|
@ -0,0 +1,3 @@
|
|||
Hello
|
||||
|
||||
<%= yield %>
|
|
@ -0,0 +1 @@
|
|||
Child
|
|
@ -0,0 +1 @@
|
|||
Monde
|
Loading…
Reference in a new issue