2011-06-22 21:13:35 +02:00
|
|
|
Feature: Built-in auto_javascript_include_tag view helper
|
|
|
|
In order to simplify including javascript files
|
|
|
|
|
|
|
|
Scenario: Viewing the root path
|
2011-12-30 00:09:51 +01:00
|
|
|
Given the Server is running at "auto-js-app"
|
2011-06-22 21:13:35 +02:00
|
|
|
When I go to "/auto-js.html"
|
|
|
|
Then I should see "javascripts/auto-js.js"
|
|
|
|
|
2014-07-20 22:53:05 +02:00
|
|
|
Scenario: Viewing the root path (directory index)
|
|
|
|
Given the Server is running at "auto-js-directory-index-app"
|
|
|
|
When I go to "/auto-js/index.html"
|
|
|
|
Then I should see "javascripts/auto-js.js"
|
|
|
|
|
2013-11-29 23:57:35 +01:00
|
|
|
Scenario: Viewing the root path (build mode)
|
|
|
|
Given a successfully built app at "auto-js-app"
|
|
|
|
When I cd to "build"
|
|
|
|
Then the following files should exist:
|
|
|
|
| auto-js.html |
|
|
|
|
And the file "auto-js.html" should contain "javascripts/auto-js.js"
|
|
|
|
|
2011-06-22 21:13:35 +02:00
|
|
|
Scenario: Viewing a tier-1 path
|
2011-12-30 00:09:51 +01:00
|
|
|
Given the Server is running at "auto-js-app"
|
2011-06-22 21:13:35 +02:00
|
|
|
When I go to "/auto-js/auto-js.html"
|
|
|
|
Then I should see "javascripts/auto-js/auto-js.js"
|
|
|
|
|
2013-11-29 23:57:35 +01:00
|
|
|
Scenario: Viewing a tier-1 path (build mode)
|
|
|
|
Given a successfully built app at "auto-js-app"
|
|
|
|
When I cd to "build"
|
|
|
|
Then the following files should exist:
|
|
|
|
| auto-js/auto-js.html |
|
|
|
|
And the file "auto-js/auto-js.html" should contain "javascripts/auto-js/auto-js.js"
|
|
|
|
|
2011-06-22 21:13:35 +02:00
|
|
|
Scenario: Viewing the index file of a tier-1 path, without filename
|
2011-12-30 00:09:51 +01:00
|
|
|
Given the Server is running at "auto-js-app"
|
2011-06-22 21:13:35 +02:00
|
|
|
When I go to "/auto-js"
|
|
|
|
Then I should see "javascripts/auto-js/index.js"
|
|
|
|
|
|
|
|
Scenario: Viewing the index file of a tier-1 path, without filename, with a trailing slash
|
2011-12-30 00:09:51 +01:00
|
|
|
Given the Server is running at "auto-js-app"
|
2011-06-22 21:13:35 +02:00
|
|
|
When I go to "/auto-js/"
|
|
|
|
Then I should see "javascripts/auto-js/index.js"
|
|
|
|
|
|
|
|
Scenario: Viewing a tier-2 path
|
2011-12-30 00:09:51 +01:00
|
|
|
Given the Server is running at "auto-js-app"
|
2011-06-22 21:13:35 +02:00
|
|
|
When I go to "/auto-js/sub/auto-js.html"
|
|
|
|
Then I should see "javascripts/auto-js/sub/auto-js.js"
|
2013-11-29 23:57:35 +01:00
|
|
|
|
|
|
|
Scenario: Viewing a tier-2 path (build mode)
|
|
|
|
Given a successfully built app at "auto-js-app"
|
|
|
|
When I cd to "build"
|
|
|
|
Then the following files should exist:
|
|
|
|
| auto-js/sub/auto-js.html |
|
|
|
|
And the file "auto-js/sub/auto-js.html" should contain "javascripts/auto-js/sub/auto-js.js"
|