mirror of
https://github.com/middleman/middleman.git
synced 2022-11-09 12:20:27 -05:00
tests for data in config.rb, closes #118
This commit is contained in:
parent
e125fc67b3
commit
41df43092d
5 changed files with 24 additions and 1 deletions
|
@ -14,4 +14,14 @@ Feature: Local Data API
|
|||
Scenario: Rendering liquid
|
||||
Given the Server is running at "test-app"
|
||||
When I go to "/data2.html"
|
||||
Then I should see "OneTwo"
|
||||
Then I should see "OneTwo"
|
||||
|
||||
Scenario: Using data in config.rb
|
||||
Given the Server is running at "data-app"
|
||||
When I go to "/test1.html"
|
||||
Then I should see "Welcome"
|
||||
|
||||
Scenario: Using data2 in config.rb
|
||||
Given the Server is running at "data-app"
|
||||
When I go to "/test2.html"
|
||||
Then I should see "Welcome"
|
3
fixtures/data-app/config.rb
Normal file
3
fixtures/data-app/config.rb
Normal file
|
@ -0,0 +1,3 @@
|
|||
data.pages.each do |p|
|
||||
page p.from, :proxy => p.to
|
||||
end
|
6
fixtures/data-app/data/pages.yml
Normal file
6
fixtures/data-app/data/pages.yml
Normal file
|
@ -0,0 +1,6 @@
|
|||
-
|
||||
from: "/test1.html"
|
||||
to: "/index.html"
|
||||
-
|
||||
from: "/test2.html"
|
||||
to: "/index.html"
|
1
fixtures/data-app/source/index.html.haml
Executable file
1
fixtures/data-app/source/index.html.haml
Executable file
|
@ -0,0 +1 @@
|
|||
%h1 Welcome
|
3
fixtures/data-app/source/layout.haml
Normal file
3
fixtures/data-app/source/layout.haml
Normal file
|
@ -0,0 +1,3 @@
|
|||
%html
|
||||
%body
|
||||
= yield
|
Loading…
Reference in a new issue