diff --git a/features/data.feature b/features/data.feature index 0977356f..9c1394c3 100644 --- a/features/data.feature +++ b/features/data.feature @@ -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" \ No newline at end of file + 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" \ No newline at end of file diff --git a/fixtures/data-app/config.rb b/fixtures/data-app/config.rb new file mode 100644 index 00000000..3daf269c --- /dev/null +++ b/fixtures/data-app/config.rb @@ -0,0 +1,3 @@ +data.pages.each do |p| + page p.from, :proxy => p.to +end \ No newline at end of file diff --git a/fixtures/data-app/data/pages.yml b/fixtures/data-app/data/pages.yml new file mode 100644 index 00000000..2ad0adbd --- /dev/null +++ b/fixtures/data-app/data/pages.yml @@ -0,0 +1,6 @@ +- + from: "/test1.html" + to: "/index.html" +- + from: "/test2.html" + to: "/index.html" \ No newline at end of file diff --git a/fixtures/data-app/source/index.html.haml b/fixtures/data-app/source/index.html.haml new file mode 100755 index 00000000..0582dd93 --- /dev/null +++ b/fixtures/data-app/source/index.html.haml @@ -0,0 +1 @@ +%h1 Welcome \ No newline at end of file diff --git a/fixtures/data-app/source/layout.haml b/fixtures/data-app/source/layout.haml new file mode 100644 index 00000000..e34689e1 --- /dev/null +++ b/fixtures/data-app/source/layout.haml @@ -0,0 +1,3 @@ +%html + %body + = yield \ No newline at end of file