Cucumber Features

Expand All

Collapse All

Feature: UI

As a user, when I ask for help, I should be presented
with instructions on how to run the app.

features/1.ui.feature:5

Scenario: Display help instructions

  1. When I get help for "pinpress"
    features/step_definitions/PinPress_steps.rb:1
  2. Then the exit status should be 0
    aruba-0.5.4/lib/aruba/cucumber.rb:188

Feature: Initialization

As a user, when I initialize PinPress,
I should be guided through the process as
necessary.

features/2.initialization.feature:6

Scenario: Basic Initialization

  1. Given no file located at "/tmp/pp/.pinpress"
    features/step_definitions/PinPress_steps.rb:6
  2. When I run `pinpress init` interactively
    aruba-0.5.4/lib/aruba/cucumber.rb:104
  3. And I type ""
    aruba-0.5.4/lib/aruba/cucumber.rb:108
  4. And I type "12345"
    aruba-0.5.4/lib/aruba/cucumber.rb:108
  5. Then the exit status should be 0
    aruba-0.5.4/lib/aruba/cucumber.rb:188
  6. And the file "/tmp/pp/.pinpress" should contain:
    aruba-0.5.4/lib/aruba/cucumber.rb:342
    ---
    pinpress:
      config_location: "/tmp/pp/.pinpress"
      default_template: pinpress_default
      log_level: WARN
      version: 1.0.0
      api_token: '12345'
    templates:
    - name: pinpress_default
      opener: "<ul>"
      item: "<li><b><a title=\"<%= description %>\" href=\"<%= href %>\" target=\"_blank\"><%=
        description %></a>.</b> <%= extended %></li>"
      closer: "</ul>"
features/2.initialization.feature:29

Scenario: Reinitialization (refuse)

  1. Given a file located at "/tmp/pp/.pinpress" with the contents:
    features/step_definitions/PinPress_steps.rb:10
    ---
    pinpress:
      config_location: "/tmp/pp/.pinpress"
      default_template: pinpress_default
      log_level: WARN
      version: 1.0.0
      api_token: '12345'
    templates:
    - name: pinpress_default
      opener: "<ul>"
      item: "<li><b><a title=\"<%= description %>\" href=\"<%= href %>\" target=\"_blank\"><%=
        description %></a>.</b> <%= extended %></li>"
      closer: "</ul>"
  2. When I run `pinpress init` interactively
    aruba-0.5.4/lib/aruba/cucumber.rb:104
  3. And I type ""
    aruba-0.5.4/lib/aruba/cucumber.rb:108
  4. Then the exit status should be 0
    aruba-0.5.4/lib/aruba/cucumber.rb:188
features/2.initialization.feature:50

Scenario: Reinitialization (accept)

  1. Given a file located at "/tmp/pp/.pinpress" with the contents:
    features/step_definitions/PinPress_steps.rb:10
    ---
    pinpress:
      config_location: "/tmp/pp/.pinpress"
      default_template: pinpress_default
      log_level: WARN
      version: 1.0.0
      api_token: '12345'
    templates:
    - name: pinpress_default
      opener: "<ul>"
      item: "<li><b><a title=\"<%= description %>\" href=\"<%= href %>\" target=\"_blank\"><%=
        description %></a>.</b> <%= extended %></li>"
      closer: "</ul>"
  2. When I run `pinpress init` interactively
    aruba-0.5.4/lib/aruba/cucumber.rb:104
  3. And I type "y"
    aruba-0.5.4/lib/aruba/cucumber.rb:108
  4. And I type ""
    aruba-0.5.4/lib/aruba/cucumber.rb:108
  5. And I type "12345"
    aruba-0.5.4/lib/aruba/cucumber.rb:108
  6. Then the exit status should be 0
    aruba-0.5.4/lib/aruba/cucumber.rb:188
  7. And the file "/tmp/pp/.pinpress" should contain:
    aruba-0.5.4/lib/aruba/cucumber.rb:342
    ---
    pinpress:
      config_location: "/tmp/pp/.pinpress"
      default_template: pinpress_default
      log_level: WARN
      version: 1.0.0
      api_token: '12345'
    templates:
    - name: pinpress_default
      opener: "<ul>"
      item: "<li><b><a title=\"<%= description %>\" href=\"<%= href %>\" target=\"_blank\"><%=
        description %></a>.</b> <%= extended %></li>"
      closer: "</ul>"
features/2.initialization.feature:89

Scenario: Reinitialization (from scratch)

  1. Given a file located at "/tmp/pp/.pinpress" with the contents:
    features/step_definitions/PinPress_steps.rb:10
    ---
    pinpress:
      config_location: "/tmp/pp/.pinpress"
      default_template: pinpress_default
      log_level: WARN
      version: 1.0.0
      api_token: '12345'
    templates:
    - name: pinpress_default
      opener: "<ul>"
      item: "<li><b><a title=\"<%= description %>\" href=\"<%= href %>\" target=\"_blank\"><%=
        description %></a>.</b> <%= extended %></li>"
      closer: "</ul>"
  2. When I run `pinpress init -s` interactively
    aruba-0.5.4/lib/aruba/cucumber.rb:104
  3. And I type ""
    aruba-0.5.4/lib/aruba/cucumber.rb:108
  4. And I type "12345"
    aruba-0.5.4/lib/aruba/cucumber.rb:108
  5. Then the exit status should be 0
    aruba-0.5.4/lib/aruba/cucumber.rb:188
  6. And the file "/tmp/pp/.pinpress" should contain:
    aruba-0.5.4/lib/aruba/cucumber.rb:342
    ---
    pinpress:
      config_location: "/tmp/pp/.pinpress"
      default_template: pinpress_default
      log_level: WARN
      version: 1.0.0
      api_token: '12345'
    templates:
    - name: pinpress_default
      opener: "<ul>"
      item: "<li><b><a title=\"<%= description %>\" href=\"<%= href %>\" target=\"_blank\"><%=
        description %></a>.</b> <%= extended %></li>"
      closer: "</ul>"

Feature: Templates

As a user, I should be able to list available
templates and choose one.

features/3.templates.feature:5

Scenario: List Templates (implicit)

  1. Given a file located at "/tmp/pp/.pinpress" with the contents:
    features/step_definitions/PinPress_steps.rb:10
    ---
    pinpress:
      config_location: "/tmp/pp/.pinpress"
      default_template: pinpress_default
      log_level: WARN
      version: 1.0.0
      api_token: '12345'
    templates:
    - name: pinpress_default
      opener: "<ul>"
      item: "<li><b><a title=\"<%= description %>\" href=\"<%= href %>\" target=\"_blank\"><%=
        description %></a>.</b> <%= extended %></li>"
      closer: "</ul>"
    - name: secondary
      item: "* <%= href %>"
  2. When I run `pinpress template` interactively
    aruba-0.5.4/lib/aruba/cucumber.rb:104
  3. Then the exit status should be 0
    aruba-0.5.4/lib/aruba/cucumber.rb:188
  4. And the output should contain:
    aruba-0.5.4/lib/aruba/cucumber.rb:147
    ---> AVAILABLE TEMPLATES
    # 1. pinpress_default
    # 2. secondary
features/3.templates.feature:33

Scenario: List Templates (explicit)

  1. Given a file located at "/tmp/pp/.pinpress" with the contents:
    features/step_definitions/PinPress_steps.rb:10
    ---
    pinpress:
      config_location: "/tmp/pp/.pinpress"
      default_template: pinpress_default
      log_level: WARN
      version: 1.0.0
      api_token: '12345'
    templates:
    - name: pinpress_default
      opener: "<ul>"
      item: "<li><b><a title=\"<%= description %>\" href=\"<%= href %>\" target=\"_blank\"><%=
        description %></a>.</b> <%= extended %></li>"
      closer: "</ul>"
    - name: secondary
      item: "* <%= href %>"
  2. When I run `pinpress template list` interactively
    aruba-0.5.4/lib/aruba/cucumber.rb:104
  3. Then the exit status should be 0
    aruba-0.5.4/lib/aruba/cucumber.rb:188
  4. And the output should contain:
    aruba-0.5.4/lib/aruba/cucumber.rb:147
    ---> AVAILABLE TEMPLATES
    # 1. pinpress_default
    # 2. secondary
features/3.templates.feature:61

Scenario: Choose Default Template

  1. Given a file located at "/tmp/pp/.pinpress" with the contents:
    features/step_definitions/PinPress_steps.rb:10
    ---
    pinpress:
      config_location: "/tmp/pp/.pinpress"
      default_template: pinpress_default
      log_level: WARN
      version: 1.0.0
      api_token: '12345'
    templates:
    - name: pinpress_default
      opener: "<ul>"
      item: "<li><b><a title=\"<%= description %>\" href=\"<%= href %>\" target=\"_blank\"><%=
        description %></a>.</b> <%= extended %></li>"
      closer: "</ul>"
    - name: secondary
      item: "* <%= href %>"
  2. When I run `pinpress template default` interactively
    aruba-0.5.4/lib/aruba/cucumber.rb:104
  3. And I type "4"
    aruba-0.5.4/lib/aruba/cucumber.rb:108
  4. And I type "0"
    aruba-0.5.4/lib/aruba/cucumber.rb:108
  5. And I type "asd"
    aruba-0.5.4/lib/aruba/cucumber.rb:108
  6. And I type "2"
    aruba-0.5.4/lib/aruba/cucumber.rb:108
  7. Then the exit status should be 0
    aruba-0.5.4/lib/aruba/cucumber.rb:188
  8. And the output should contain:
    aruba-0.5.4/lib/aruba/cucumber.rb:147
    ---> CHOOSE A DEFAULT TEMPLATE
    # Current Default Template: pinpress_default
    # Choose a New Template:
    # 1. pinpress_default
    # 2. secondary
    # Invalid choice: 4
    # Invalid choice: 0
    # Invalid choice: asd
    # New default template chosen: secondary
  9. And the file "/tmp/pp/.pinpress" should contain:
    aruba-0.5.4/lib/aruba/cucumber.rb:342
    ---
    pinpress:
      config_location: "/tmp/pp/.pinpress"
      default_template: secondary
      log_level: WARN
      version: 1.0.0
      api_token: '12345'
    templates:
    - name: pinpress_default
      opener: "<ul>"
      item: "<li><b><a title=\"<%= description %>\" href=\"<%= href %>\" target=\"_blank\"><%=
        description %></a>.</b> <%= extended %></li>"
      closer: "</ul>"

Feature: Templates

As a user, I should be able get pins from Pinboard
and have them inherit certain templates.

features/4.pins.feature:5

Scenario: Invalid API Key

  1. Given a file located at "/tmp/pp/.pinpress" with the contents:
    features/step_definitions/PinPress_steps.rb:10
    ---
    pinpress:
      config_location: "/tmp/pp/.pinpress"
      default_template: pinpress_default
      log_level: WARN
      version: 1.0.0
      api_token: '12345'
    templates:
    - name: pinpress_default
      opener: "<ul>"
      item: "<li><b><a title=\"<%= description %>\" href=\"<%= href %>\" target=\"_blank\"><%=
        description %></a>.</b> <%= extended %></li>"
      closer: "</ul>"
    - name: secondary
      item: "* <%= href %>"
  2. When I run `pinpress pins` interactively
    aruba-0.5.4/lib/aruba/cucumber.rb:104
  3. Then the exit status should be 1
    aruba-0.5.4/lib/aruba/cucumber.rb:188