tests for data in config.rb, closes #118
This commit is contained in:
parent
e125fc67b3
commit
41df43092d
|
@ -15,3 +15,13 @@ Feature: Local Data API
|
||||||
Given the Server is running at "test-app"
|
Given the Server is running at "test-app"
|
||||||
When I go to "/data2.html"
|
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