Sha256: e537f3ca6e6b60d98897450c0d7447734073f541e1fe5cd7158c1031802df565

Contents?: true

Size: 1.62 KB

Versions: 56

Compression:

Stored size: 1.62 KB

Contents

Feature: Parsing
  As a source code writer I want to be able to
  collect all puzzles from all my text files and
  present them in XML format

  Scenario: Simple puzzles collecting
    Given I have a "Sample.java" file with content:
    """
    public class Main {
      /**
       * @todo #13 Let's do it later, dude
       *  or maybe even never :)
       */
      public void main(String[] args) {
        // later
      }
    }
    """
    When I run pdd
    Then XML matches "/puzzles[count(puzzle)=1]"
    And XML matches "//puzzle[file='Sample.java']"
    And XML matches "//puzzle[ticket='13']"
    And XML matches "//puzzle[lines='3-4']"
    And XML matches "//puzzle[starts-with(body,'Let')]"
    And XML matches "//puzzle[role='IMP']"
    And XML matches "//puzzle[estimate='0']"

  Scenario: Multiple puzzles in one file
    Given I have a "test/a/b/c/Sample.java" file with content:
    """
    public class Main {
      /**
       * @todo #13 This one later
       * @todo #ABC-67:15min And this one ever later
       * @todo #F-78-3:2h/DEV This is for a developer
       *  who will join us later
       */
      public void main(String[] args) {
        // later
      }
    }
    """
    When I run pdd
    Then XML matches "/puzzles[count(puzzle)=3]"
    And XML matches "//puzzle[ticket='13' and lines='3-3']"
    And XML matches "//puzzle[ticket='13' and body='This one later']"
    And XML matches "//puzzle[ticket='ABC-67' and lines='4-4']"
    And XML matches "//puzzle[ticket='F-78-3' and lines='5-6']"
    And XML matches "//puzzle[ticket='ABC-67' and estimate='15']"
    And XML matches "//puzzle[ticket='F-78-3' and estimate='120']"

Version data entries

56 entries across 56 versions & 1 rubygems

Version Path
pdd-0.19.4 features/parsing.feature
pdd-0.19.3 features/parsing.feature
pdd-0.19.2 features/parsing.feature
pdd-0.19.1 features/parsing.feature
pdd-0.19 features/parsing.feature
pdd-0.18.3 features/parsing.feature
pdd-0.18.2 features/parsing.feature
pdd-0.18.1 features/parsing.feature
pdd-0.18 features/parsing.feature
pdd-0.17.9 features/parsing.feature
pdd-0.17.8 features/parsing.feature
pdd-0.17.7 features/parsing.feature
pdd-0.17.6 features/parsing.feature
pdd-0.17.5 features/parsing.feature
pdd-0.17.4 features/parsing.feature
pdd-0.17.3 features/parsing.feature
pdd-0.17.2 features/parsing.feature
pdd-0.17.1 features/parsing.feature
pdd-0.17 features/parsing.feature
pdd-0.16.4 features/parsing.feature