Test relative_assets with i18n
This commit is contained in:
parent
56c6327aed
commit
05834ad386
|
@ -119,3 +119,22 @@ Feature: i18n Builder
|
|||
| es/hola.html |
|
||||
And the file "index.html" should contain "Howdy"
|
||||
And the file "hello.html" should contain "Hello World"
|
||||
|
||||
Scenario: Running localize with relative_assets
|
||||
Given a fixture app "i18n-test-app"
|
||||
And a file named "config.rb" with:
|
||||
"""
|
||||
activate :i18n
|
||||
activate :relative_assets
|
||||
"""
|
||||
Given a successfully built app at "i18n-test-app"
|
||||
When I cd to "build"
|
||||
Then the following files should exist:
|
||||
| index.html |
|
||||
| hello.html |
|
||||
| es/index.html |
|
||||
| es/hola.html |
|
||||
And the file "index.html" should contain '"stylesheets/site.css"'
|
||||
And the file "hello.html" should contain '"stylesheets/site.css"'
|
||||
And the file "es/index.html" should contain '"../stylesheets/site.css"'
|
||||
And the file "es/hola.html" should contain '"../stylesheets/site.css"'
|
|
@ -111,3 +111,20 @@ Feature: i18n Preview
|
|||
Then I should see "File Not Found"
|
||||
When I go to "/es/hola.html"
|
||||
Then I should see "File Not Found"
|
||||
|
||||
Scenario: Running localize with relative_assets
|
||||
Given a fixture app "i18n-test-app"
|
||||
And a file named "config.rb" with:
|
||||
"""
|
||||
activate :i18n
|
||||
activate :relative_assets
|
||||
"""
|
||||
Given the Server is running at "i18n-test-app"
|
||||
When I go to "/"
|
||||
Then I should see '"stylesheets/site.css"'
|
||||
When I go to "/hello.html"
|
||||
Then I should see '"stylesheets/site.css"'
|
||||
When I go to "/es/index.html"
|
||||
Then I should see '"../stylesheets/site.css"'
|
||||
When I go to "/es/hola.html"
|
||||
Then I should see '"../stylesheets/site.css"'
|
|
@ -1 +1,8 @@
|
|||
<html>
|
||||
<head>
|
||||
<%= stylesheet_link_tag :site %>
|
||||
</head>
|
||||
<body>
|
||||
<%= yield %>
|
||||
</body>
|
||||
</html>
|
|
@ -0,0 +1,3 @@
|
|||
body {
|
||||
hello: world;
|
||||
}
|
Loading…
Reference in a new issue