Sha256: 67074c381dc7f99388cf6673a1ef8c2b291cd8d6dca07b96dfa38235b491a2ca

Contents?: true

Size: 1.48 KB

Versions: 15

Compression:

Stored size: 1.48 KB

Contents

Feature: Warn on multiple configuration files
  Reek is designed for one configuration file and for one configuration file only.
  We should make this clear to the user by warning him when we detect multiple
  configuration files and then exiting the program.

  Scenario: Warn on more than one configuration file
    Given the smelly file 'smelly.rb'
    And a file named "config.reek" with:
      """
      ---
      UncommunicativeMethodName:
        enabled: false
      """
    And a file named ".todo.reek" with:
      """
      ---
      UtilityFunction:
        enabled: false
      """
    When I run reek smelly.rb
    Then it reports the error "Error: Found multiple configuration files '.todo.reek', 'config.reek'"
    And it reports the error "Reek supports only one configuration file. You have 2 options now:"
    And it reports the error "1) Remove all offending files"
    And it reports the error "2) Be specific about which one you want to load via the -c switch"
    And the exit status indicates an error

  Scenario: Do not warn on more than one when we explicitly specify one configuration file
    Given the smelly file 'smelly.rb'
    And a file named "config.reek" with:
      """
      ---
      UncommunicativeMethodName:
        enabled: false
      """
    And a file named ".todo.reek" with:
      """
      ---
      UtilityFunction:
        enabled: false
      """
    When I run reek -c config.reek smelly.rb
    Then the exit status indicates smells
    And it reports no errors

Version data entries

15 entries across 15 versions & 1 rubygems

Version Path
reek-4.8.2 features/configuration_files/warn_about_multiple_configuration_files.feature
reek-4.8.1 features/configuration_files/warn_about_multiple_configuration_files.feature
reek-4.8.0 features/configuration_files/warn_about_multiple_configuration_files.feature
reek-4.7.3 features/configuration_files/warn_about_multiple_configuration_files.feature
reek-4.7.2 features/configuration_files/warn_about_multiple_configuration_files.feature
reek-4.7.1 features/configuration_files/warn_about_multiple_configuration_files.feature
reek-4.7.0 features/configuration_files/warn_about_multiple_configuration_files.feature
reek-4.6.2 features/configuration_files/warn_about_multiple_configuration_files.feature
reek-4.6.1 features/configuration_files/warn_about_multiple_configuration_files.feature
reek-4.6.0 features/configuration_files/warn_about_multiple_configuration_files.feature
reek-4.5.6 features/configuration_files/warn_about_multiple_configuration_files.feature
reek-4.5.5 features/configuration_files/warn_about_multiple_configuration_files.feature
reek-4.5.4 features/configuration_files/warn_about_multiple_configuration_files.feature
reek-4.5.3 features/configuration_files/warn_about_multiple_configuration_files.feature
reek-4.5.2 features/configuration_files/warn_about_multiple_configuration_files.feature