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

@ -118,4 +118,23 @@ Feature: i18n Builder
| es/index.html |
| es/hola.html |
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

@ -110,4 +110,21 @@ Feature: i18n Preview
When I go to "/es/index.html"
Then I should see "File Not Found"
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 @@
<%= yield %>
<html>
<head>
<%= stylesheet_link_tag :site %>
</head>
<body>
<%= yield %>
</body>
</html>

View file

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