Meta Parametrisation

Another use of meta info in our stories is to allow the definition of implicit scenario parameters used in our steps.

For example, we may define the meta properties, both at story and scenario level (with usual inheritance pattern), and have these parameters injected in the step method, as if they had been specified in the step itself:

Meta: 

@theme parameters

Scenario: scenario with hidden meta params

Meta:

@variant foo

Given I have some step that implicitly requires meta params
Then the theme is 'parameters' with variant 'foo'

where the corresponding Java method is

    @Given("I have some step that implicitly requires meta params")
    public void givenAThemeAndVariant(@Named("variant") String variant, @Named("theme") String theme) {
        this.theme = theme;
        this.variant = variant;
    }

Note that we use Named parameters, in the same way that we'd use for parametrised scenarios.