Feature: Rosey Generate Complex Background: Given I have the environment variables: | ROSEY_SOURCE | dist/site | | ROSEY_DEST | dist/translated_site | Scenario: Rosey generates locales [ns, root, attr, explicit-attr] Given I have a "dist/site/index.html" file with the content: """ Home header title

Home page title

Home page subtitle

Contact content

Contact title

Footer content

""" When I run my program with the flags: | generate | 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:content:subtitle.original | Home page subtitle | | keys.home:content:subtitle\.content.original | Content attribute | | keys.home:content:subtitle\.alt.original | alt attribute | | keys.home:contact:contact-us.original | Contact content | | keys.home:contact:content-tag.original | Content attribute | | keys.home:contact:alt-tag.original | alt attribute | | keys.footer.original | Footer content | Scenario: Rosey namespace applies to self element Given I have a "dist/site/index.html" file with the content: """

c

""" When I run my program with the flags: | generate | Then I should see "rosey/base.json" containing the values: | version | int:2 | | keys.a:b.original | c | | keys.one:two.original | three | Scenario: Rosey root applies to self element Given I have a "dist/site/index.html" file with the content: """

3

""" When I run my program with the flags: | generate | Then I should see "rosey/base.json" containing the values: | version | int:2 | | keys.1:2.original | 3 | | keys.one:two.original | three |