Tests for #477
This commit is contained in:
parent
4ea2f6f7ed
commit
5071a2c15d
|
@ -47,4 +47,18 @@ Feature: Custom layouts
|
||||||
When I go to "/custom-layout-dir/"
|
When I go to "/custom-layout-dir/"
|
||||||
Then I should see "Custom Layout"
|
Then I should see "Custom Layout"
|
||||||
When I go to "/custom-layout-dir/index.html"
|
When I go to "/custom-layout-dir/index.html"
|
||||||
Then I should see "Custom Layout"
|
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