Module: Methadone::Cucumber

Defined in:
lib/methadone/cucumber.rb

Overview

By require‘ing methadone/cucumber in your Cucumber setup (e.g. in env.rb), you gain access to the steps defined in this file. They provide you with the following:

  • Run command_to_run --help using aruba

    When I get help for "command_to_run"
    
  • Make sure that each option shows up in the help and has some sort of documentation. By default, the options won’t be required to be negatable.

    Then the following options should be documented:
      |--force|
      |-x     |
    
    Then the following options should be documented:
      |--force| which is negatable     |
      |-x     | which is not negatable |
    
  • Check an individual option for documentation:

    Then the option "--force" should be documented
    Then the option "--force" should be documented which is negatable
    
  • Checks that the help has a proper usage banner

    Then the banner should be present
    
  • Checks that the banner includes the version

    Then the banner should include the version
    
  • Checks that the usage banner indicates it takes options via [options]

    Then the banner should document that this app takes options
    
  • Do the opposite; check that you don’t indicate options are accepted

    Then the banner should document that this app takes no options
    
  • Checks that the app’s usage banner documents that its arguments are args

    Then the banner should document that this app's arguments are
      |foo|which is optional|
      |bar|which is required|
    
  • Do the opposite; check that your app doesn’t take any arguments

    Then the banner should document that this app takes no arguments
    
  • Check for a usage description which occurs after the banner and a blank line

    Then there should be a one line summary of what the app does