Contents

count

In order to see relevant information As a command line junkie I want to count the cards that are displayed

Scenario: count total cards

  • When I run `cardigan` interactively
  • And I create the following cards:
    name
    card 1
    card 2
  • And I type "count"
  • And I type "exit"
  • Then the exit status should be 0
  • And the stdout should contain:
    text
     -------
    | count |
     -------
    | 2     |
     -------

Scenario: count total cards grouped by an attribute

  • When I run `cardigan` interactively
  • And I create the following cards:
    namerelease
    card 1ocelot
    card 2ocelot
    card 3margay
  • And I type "count release"
  • And I type "exit"
  • Then the exit status should be 0
  • And the stdout should contain:
    text
     -----------------
    | release | count |
     -----------------
    | margay  | 1     |
    | ocelot  | 2     |
    |         | 3     |
     -----------------

Scenario: count total cards grouped by an attribute

  • When I run `cardigan` interactively
  • And I create the following cards:
    namerelease
    card 1ocelot
    card 2margay
    card 3
  • And I type "count release"
  • And I type "exit"
  • Then the exit status should be 0
  • And the stdout should contain:
    text
     -----------------
    | release | count |
     -----------------
    |         | 1     |
    | margay  | 1     |
    | ocelot  | 1     |
    |         | 3     |
     -----------------

Source: features/commands/count.feature at commit b93b5958, Cardigan (MIT license).