Sha256: de876ee92f7139fdbb1adb2cb640b5590433ad3627c0699f7da795932c134a9e

Contents?: true

Size: 1.54 KB

Versions: 16

Compression:

Stored size: 1.54 KB

Contents

Feature: Catches Broken Puzzles
  As a source code writer I want to be sure that
  broken puzzles won't be processed and will
  cause runtime errors

  Scenario: Throwing exception on broken puzzles
    Given I have a "Sample.java" file with content:
    """
    public class Main {
      /**
       * Some other documentation
       * text that is not relevant to
       * the puzzle below.
       * @todo #13 This puzzle has an incorrect format
       * because it doesn't start with a space on
       * the second and the third lines
       */
      public void main(String[] args) {
        // later
      }
    }
    """
    When I run pdd it fails with "Space expected"
    When I run pdd it fails with "puzzle at line #6"

  Scenario: Throwing exception on another broken puzzle
    Given I have a "Sample.java" file with content:
    """
    public class Main {
      /**
       * @todo #13 This puzzle has an incorrect format
       *    because its second line starts with too many spaces
       */
      public void main(String[] args) {
        // later
      }
    }
    """
    When I run pdd it fails with "Too many leading spaces"

  Scenario: Throwing exception on yet another broken puzzle
    Given I have a "Sample.java" file with content:
    """
    public class Main {
      //
      // @todo #13 This puzzle has an incorrect format
      // because there is no space character in the
      // second and third lines
      //
      public void main(String[] args) {
        // later
      }
    }
    """
    When I run pdd it fails with "Space expected"

Version data entries

16 entries across 16 versions & 1 rubygems

Version Path
pdd-0.20.6 features/catches_broken_puzzles.feature
pdd-0.20.5 features/catches_broken_puzzles.feature
pdd-0.20.4 features/catches_broken_puzzles.feature
pdd-0.20.3 features/catches_broken_puzzles.feature
pdd-0.20.2 features/catches_broken_puzzles.feature
pdd-0.20.1 features/catches_broken_puzzles.feature
pdd-0.20 features/catches_broken_puzzles.feature
pdd-0.19.4 features/catches_broken_puzzles.feature
pdd-0.19.3 features/catches_broken_puzzles.feature
pdd-0.19.2 features/catches_broken_puzzles.feature
pdd-0.19.1 features/catches_broken_puzzles.feature
pdd-0.19 features/catches_broken_puzzles.feature
pdd-0.18.3 features/catches_broken_puzzles.feature
pdd-0.18.2 features/catches_broken_puzzles.feature
pdd-0.18.1 features/catches_broken_puzzles.feature
pdd-0.18 features/catches_broken_puzzles.feature