Feature: Rosey Generate Options
Background:
Given I have the environment variables:
| ROSEY_SOURCE | dist/site |
| ROSEY_DEST | dist/translated_site |
Scenario: Rosey generates custom separators
Given I have a "dist/site/index.html" file with the content:
"""
Home header title
Home page title
"""
When I run my program with the flags:
| generate |
| --separator "~" |
Then I should see "rosey/base.json" containing the values:
| version | int:2 |
| keys.home:meta~title.original | Home header title |
| keys.home:content~title.original | Home page title |
| keys.home:contact~contact-us.original | Contact content |
| keys.footer.original | Footer content |
Scenario: Rosey generates from custom tags
Given I have a "dist/site/index.html" file with the content:
"""
Home header title
Home page title
"""
When I run my program with the flags:
| generate |
| --tag "something-else" |
Then I should see "rosey/base.json" containing the values:
| version | int:2 |
| keys.home:meta:title.original | Home header title |
| keys.home:content:title.original | Home page title |
| keys.home:contact:contact-us.original | Contact content |
| keys.footer.original | Footer content |
Scenario: Rosey generates to a custom base file
Given I have a "dist/site/index.html" file with the content:
"""
Kiss From A Rose
"""
When I run my program with the flags:
| generate |
| --base "row-z/zz-base.json" |
Then I should see "row-z/zz-base.json" containing the values:
| version | int:2 |
| keys.seal.original | Kiss From A Rose |