<commit_before>@flexo-init
Feature: The init command

  In order to simplify creation of new Flexo projects
  I want a simple command which does it for me

  Scenario: Initializing with default settings
    When I run "flexo init"
    Then the exit status should be 0
      And .flexo should be a file
      And .flexo should expect default sources in public/images/sprites
      And .flexo should expect default sprites to be saved in public/images
      And the fixture sources should exist in public/images/sprites

  Scenario: Initializing in an existing project
    When I run "flexo init"
    When I run "flexo init"
    Then the exit status should be 1
      And the stdout should contain "A .flexo file already exists"

  Scenario: Initializing with a custom sprite directory
    When I run "flexo init --sprites public/other"
    Then the exit status should be 0
      And .flexo should expect default sources in public/other/sprites
      And .flexo should expect default sprites to be saved in public/other
      And the fixture sources should exist in public/other/sprites

  Scenario: Initializing with a custom sprite and source directory
    When I run "flexo init --sprites public/other --sources src/sprites"
    Then the exit status should be 0
      And .flexo should expect default sources in src/sprites
      And .flexo should expect default sprites to be saved in public/other
      And the fixture sources should exist in src/sprites

  Scenario: Initializing without example images
    When I run "flexo init --no-examples"
    Then the exit status should be 0
      And .flexo should be a file
      And the fixture sources should not exist

  Scenario: Initializing with a Windows config file
    When I run "flexo init --windows"
    Then the exit status should be 0
      And flexo.rb should be a file
      And flexo.rb should expect the cache to be at flexo.cache<commit_msg>Test that flexo.rb can be found.<commit_after>@flexo-init
Feature: The init command

  In order to simplify creation of new Flexo projects
  I want a simple command which does it for me

  Scenario: Initializing with default settings
    When I run "flexo init"
    Then the exit status should be 0
      And .flexo should be a file
      And .flexo should expect default sources in public/images/sprites
      And .flexo should expect default sprites to be saved in public/images
      And the fixture sources should exist in public/images/sprites

  Scenario: Initializing in an existing project
    When I run "flexo init"
    When I run "flexo init"
    Then the exit status should be 1
      And the stdout should contain "A .flexo file already exists"

  Scenario: Initializing with a custom sprite directory
    When I run "flexo init --sprites public/other"
    Then the exit status should be 0
      And .flexo should expect default sources in public/other/sprites
      And .flexo should expect default sprites to be saved in public/other
      And the fixture sources should exist in public/other/sprites

  Scenario: Initializing with a custom sprite and source directory
    When I run "flexo init --sprites public/other --sources src/sprites"
    Then the exit status should be 0
      And .flexo should expect default sources in src/sprites
      And .flexo should expect default sprites to be saved in public/other
      And the fixture sources should exist in src/sprites

  Scenario: Initializing without example images
    When I run "flexo init --no-examples"
    Then the exit status should be 0
      And .flexo should be a file
      And the fixture sources should not exist

  Scenario: Initializing with a Windows config file
    When I run "flexo init --windows"
    Then the exit status should be 0
      And flexo.rb should be a file
      And flexo.rb should expect the cache to be at flexo.cache
    When I run "flexo generate --fast"
    Then the exit status should be 0
{'fraction_non_alphanumeric': 0.03583312004095214, 'fraction_numerical': 0.0033273611466598414, 'mean_word_length': 2.9594731509625127, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 3, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '4013434', 'n_tokens_mistral': 1033, 'n_tokens_neox': 991, 'n_words': 565}