Merge pull request #308 from bhollis/master
Test showing variables not getting passed to templates during build
This commit is contained in:
commit
bba2584c81
|
@ -85,6 +85,21 @@ Feature: Dynamic Pages
|
||||||
Then I should see "I am real: two"
|
Then I should see "I am real: two"
|
||||||
Then I should see "Global: I am four glob"
|
Then I should see "Global: I am four glob"
|
||||||
Then I should see "All: I am all glob"
|
Then I should see "All: I am all glob"
|
||||||
|
|
||||||
|
Scenario: Build proxy with variable one
|
||||||
|
Given a successfully built app at "dynamic-pages-app"
|
||||||
|
When I cd to "build"
|
||||||
|
Then the file "fake/one.html" should contain "I am real: one"
|
||||||
|
Then the file "fake/one.html" should contain "Global: I am one glob"
|
||||||
|
Then the file "fake/one.html" should contain "All: I am all glob"
|
||||||
|
|
||||||
|
Then the file "fake2/one.html" should contain "I am real: one"
|
||||||
|
Then the file "fake2/one.html" should contain "Global: I am two glob"
|
||||||
|
Then the file "fake2/one.html" should contain "All: I am all glob"
|
||||||
|
|
||||||
|
Then the file "fake3/one.html" should contain "I am real: one"
|
||||||
|
Then the file "fake3/one.html" should contain "Global: I am three glob"
|
||||||
|
Then the file "fake3/one.html" should contain "All: I am all glob"
|
||||||
|
|
||||||
Scenario: Target ignore
|
Scenario: Target ignore
|
||||||
Given the Server is running at "dynamic-pages-app"
|
Given the Server is running at "dynamic-pages-app"
|
||||||
|
|
|
@ -14,16 +14,16 @@ page "target_ignore3.html", :proxy => "should_be_ignored7.html", :ignore => true
|
||||||
page "/target_ignore4.html", :proxy => "should_be_ignored8.html", :ignore => true
|
page "/target_ignore4.html", :proxy => "should_be_ignored8.html", :ignore => true
|
||||||
|
|
||||||
%w(one two).each do |num|
|
%w(one two).each do |num|
|
||||||
page "/fake/#{num}.html", :proxy => "/real/index.html" do
|
page "/fake/#{num}.html", :proxy => "/real/index.html", :ignore => true do
|
||||||
@num = num
|
@num = num
|
||||||
end
|
end
|
||||||
page "fake2/#{num}.html", :proxy => "/real/index.html" do
|
page "fake2/#{num}.html", :proxy => "/real/index.html", :ignore => true do
|
||||||
@num = num
|
@num = num
|
||||||
end
|
end
|
||||||
page "fake3/#{num}.html", :proxy => "real/index.html" do
|
page "fake3/#{num}.html", :proxy => "real/index.html", :ignore => true do
|
||||||
@num = num
|
@num = num
|
||||||
end
|
end
|
||||||
page "/fake4/#{num}.html", :proxy => "real/index.html" do
|
page "/fake4/#{num}.html", :proxy => "real/index.html", :ignore => true do
|
||||||
@num = num
|
@num = num
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
@ -46,4 +46,4 @@ end
|
||||||
|
|
||||||
page "fake4/*" do
|
page "fake4/*" do
|
||||||
@glob_var = "I am four glob"
|
@glob_var = "I am four glob"
|
||||||
end
|
end
|
||||||
|
|
|
@ -42,11 +42,7 @@ module Middleman::Sitemap
|
||||||
# Internal path to be requested when rendering this page
|
# Internal path to be requested when rendering this page
|
||||||
# @return [String]
|
# @return [String]
|
||||||
def request_path
|
def request_path
|
||||||
if proxy?
|
destination_path
|
||||||
store.page(proxied_to).destination_path
|
|
||||||
else
|
|
||||||
destination_path
|
|
||||||
end
|
|
||||||
end
|
end
|
||||||
|
|
||||||
# Set the on-disk source file for this page
|
# Set the on-disk source file for this page
|
||||||
|
|
Loading…
Reference in a new issue