…pplication exited with error (2).
Update the junit_formatter.feature to cover more cases with respect to Scenario Outlines.
In general there seem to be some weird dependencies (or lack there of) between configuration options and information in `Cucumber::Cli::Configuration#feature_files` that could probably be clarified with a little refactoring. One example that this feature exposed directly is that `Cucumber::Cli::Configuration#feature_files` does not depend on `Cucumber::Cli::Configuration#feature_dirs` though their names certainly imply dependence. I had deleted `Cucumber::Cli::Configuration#feature_dirs` to eliminate the confusion, but added it back in when I realized it was used in `features/docs/post_configuration_hook.feature`
Add a feature documenting the order after hooks should be executed. See: https://github.com/cucumber/cucumber/wiki/Hooks#scenario-hooks cc. @mattwynne
Catch undefined steps inside `invoke_dynamic_step` so that we can report them as errors to the user.
This scenario highlights a regression about how we print snippets for undefined, nested steps. What's the right behaviour here? Previously, we treated these as the same as undefined steps from features, but now I've looked into this, I'm not so sure. This scenario describes the existing behaviour, but is it desirable? If you have a nested step, surely you expect it to already match? If it fails to match, I think you just want that to be a straight up failure, rather than a regular "undefined" error that prints a snippet. In the new 2.0 model, we know about undefined Gherkin steps as soon as we've compiled the mappings, but we can't know about nested steps until we execute the action, so they're different. It feels like the model might be telling us something.
This ensures that prepare world is the first thing that is run for a test case, preventing the inconsistency with what the world _is_ in around hooks. Legacy adapter requires each test case to have a test step otherwise it doesn't switch step container and messages get lost. Also ensures failures in Around hooks are reported.
Fixes #768 (the keyword part).
Fail only when there are undefined steps when using both the --dry-run and the --strict options. Fail when there are pending steps with the --strict option.
Delay sending the step output to the gherkin formatter in the JSONFormatter, also for Scenario Outlines in expanded mode, until step has been called on the gherkin formatter.