views:

20

answers:

0

Hi,

I am building a cucumber feature that looks like this:

Feature: Parsing of license files
  As a developer
  I want to know which requirements, prohibitions and permissions a license gives me
  So I can know my rights and duties.

    Scenario: Analyzing a known license
        Given I run local executable "licc" with arguments "gpl3"
        Then I should see
        """
        GNU GPL 3.0
        Permits: DerivateWorks, Distribution, Reproduction
        Requires: Copyleft, Notice, SourceCode
        Prohibits: ---
        """

I want to test more licenses, but how I could do so without repeating the same scenario over and over? At first, I thought about using scenario outlines, like:

Scenario Outline: Hello World (with examples)
    Given The Action is <action>
    When The Subject is <subject>
    Then The Greeting is <greeting>.

    Examples:
    |action|subject|greeting|
    |Hello|Mike|Hello, Mike|
    |Jump|Tom|Jump, Tom|
    |Shout|Jim|Shout, Jim|

But as my output is multiline, I don't think it'll work. Is there any other way? Maybe using a support. Ideally, I should simply create a hash with like {'gpl3' => "gpl3 description", 'bsd' => 'bsd description'} and pass that to cucumber, but how I could do that?