Test relative_assets with i18n
This commit is contained in:
parent
56c6327aed
commit
05834ad386
|
@ -118,4 +118,23 @@ Feature: i18n Builder
|
||||||
| es/index.html |
|
| es/index.html |
|
||||||
| es/hola.html |
|
| es/hola.html |
|
||||||
And the file "index.html" should contain "Howdy"
|
And the file "index.html" should contain "Howdy"
|
||||||
And the file "hello.html" should contain "Hello World"
|
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"'
|
|
@ -110,4 +110,21 @@ Feature: i18n Preview
|
||||||
When I go to "/es/index.html"
|
When I go to "/es/index.html"
|
||||||
Then I should see "File Not Found"
|
Then I should see "File Not Found"
|
||||||
When I go to "/es/hola.html"
|
When I go to "/es/hola.html"
|
||||||
Then I should see "File Not Found"
|
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 @@
|
||||||
<%= yield %>
|
<html>
|
||||||
|
<head>
|
||||||
|
<%= stylesheet_link_tag :site %>
|
||||||
|
</head>
|
||||||
|
<body>
|
||||||
|
<%= yield %>
|
||||||
|
</body>
|
||||||
|
</html>
|
|
@ -0,0 +1,3 @@
|
||||||
|
body {
|
||||||
|
hello: world;
|
||||||
|
}
|
Loading…
Reference in a new issue