Sha256: 72ae61f8c20f36719ed64b43e918ce3692a3521df2b41bf131477208e8dfab4d

Contents?: true

Size: 1.22 KB

Versions: 14

Compression:

Stored size: 1.22 KB

Contents

@stdin
Feature: Reek reads from $stdin when no files are given
  In order to use reek with pipelines
  As a developer
  I want to pipe source code on stdin

  Scenario: return zero status with no smells
    When I pass "def simple() @fred = 3 end" to reek
    Then it succeeds
    And it reports:
      """
      """

  Scenario: outputs nothing on empty stdin
    When I pass "" to reek --quiet
    Then it succeeds
    And stdout equals ""

  Scenario: outputs header only on empty stdin in verbose mode
    When I pass "" to reek -V
    Then it succeeds
    And it reports:
      """
      $stdin -- 0 warnings

      """

  Scenario: return non-zero status when there are smells
    When I pass "class Turn; def y() @x = 3; end end" to reek
    Then the exit status indicates smells
    And it reports:
      """
      $stdin -- 3 warnings:
        [1]:Turn has no descriptive comment (IrresponsibleModule)
        [1]:Turn has the variable name '@x' (UncommunicativeVariableName)
        [1]:Turn#y has the name 'y' (UncommunicativeMethodName)

      """

  @stderr
  Scenario: syntax error causes the source to be ignored
    When I pass "def incomplete" to reek
    Then it reports a parsing error
    Then it succeeds
    And stdout equals ""

Version data entries

14 entries across 14 versions & 1 rubygems

Version Path
reek-1.6.6 features/command_line_interface/stdin.feature
reek-1.6.5 features/command_line_interface/stdin.feature
reek-1.6.4 features/command_line_interface/stdin.feature
reek-1.6.3 features/command_line_interface/stdin.feature
reek-1.6.2 features/command_line_interface/stdin.feature
reek-1.6.1 features/command_line_interface/stdin.feature
reek-1.6.0 features/command_line_interface/stdin.feature
reek-1.5.1 features/command_line_interface/stdin.feature
reek-1.5.0 features/command_line_interface/stdin.feature
reek-1.4.0 features/command_line_interface/stdin.feature
reek-1.3.8 features/command_line_interface/stdin.feature
reek-1.3.7 features/command_line_interface/stdin.feature
reek-1.3.6 features/command_line_interface/stdin.feature
reek-1.3.5 features/command_line_interface/stdin.feature