Test relative_assets with i18n

This commit is contained in:
Thomas Reynolds 2012-09-02 10:04:43 -07:00
parent 56c6327aed
commit 05834ad386
4 changed files with 49 additions and 3 deletions

View file

@ -119,3 +119,22 @@ Feature: i18n Builder
| 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"'

View file

@ -111,3 +111,20 @@ Feature: i18n Preview
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"'

View file

@ -1 +1,8 @@
<html>
<head>
<%= stylesheet_link_tag :site %>
</head>
<body>
<%= yield %> <%= yield %>
</body>
</html>

View file

@ -0,0 +1,3 @@
body {
hello: world;
}