Feature: Rosey Build Options Background: Given I have the environment variables: | ROSEY_SOURCE | dist/site | | ROSEY_DEST | dist/translated_site | Scenario: Rosey builds with custom source and dest Given I have a "happy/index.html" file with the content: """
Kiss From A Rose
""" And I have a "rosey/locales/emotion.json" file with the content: """ { "seal": "ππΉ" } """ When I run my program with the flags: | build | | --source "happy" | | --dest "sad" | Then I should see a selector 'title' in "sad/index.html" with the attributes: | innerText | Redirecting... | And I should see a selector 'a' in "sad/index.html" with the attributes: | href | /en/ | | innerText | Click here if you are not redirected. | And I should see a selector 'p' in "sad/en/index.html" with the attributes: | data-rosey | seal | | innerText | Kiss From A Rose | And I should see a selector 'p' in "sad/emotion/index.html" with the attributes: | data-rosey | seal | | innerText | ππΉ | Scenario: Rosey builds with custom separators Given I have a "dist/site/index.html" file with the content: """Contact content
Footer content
Contact content
Footer content
Kiss From A Rose
""" And I have a "cloud/cannon.json" file with the content: """ { "seal": "ππΉ" } """ When I run my program with the flags: | build | | --locales "cloud" | Then I should see a selector 'title' in "dist/translated_site/index.html" with the attributes: | innerText | Redirecting... | And I should see a selector 'a' in "dist/translated_site/index.html" with the attributes: | href | /en/ | | innerText | Click here if you are not redirected. | And I should see a selector 'p' in "dist/translated_site/en/index.html" with the attributes: | data-rosey | seal | | innerText | Kiss From A Rose | And I should see a selector 'p' in "dist/translated_site/cannon/index.html" with the attributes: | data-rosey | seal | | innerText | ππΉ | Scenario: Rosey builds with an alternate default language Given I have a "dist/site/index.html" file with the content: """gander
""" And I have a "rosey/locales/em.json" file with the content: """ { "goose": "πΉ" } """ When I run my program with the flags: | build | | --default-language "poultry" | Then I should see a selector 'title' in "dist/translated_site/index.html" with the attributes: | innerText | Redirecting... | And I should see a selector 'a' in "dist/translated_site/index.html" with the attributes: | href | /poultry/ | | innerText | Click here if you are not redirected. | And I should see a selector 'p' in "dist/translated_site/poultry/index.html" with the attributes: | data-rosey | goose | | innerText | gander | And I should see a selector 'p' in "dist/translated_site/em/index.html" with the attributes: | data-rosey | goose | | innerText | πΉ |