通常、Cucumber は、機能ファイルで定義したものと同じように見えるようにバックグラウンド ステップを出力します (上部に 1 回)。
$ bundle exec cucumber --color --format pretty
Feature: Something
Background:
Given step 1
And step 2
Scenario: a scenario
When I do step 3
Then it works
Scenario: another scenario
When I do a different step 3
Then it works
シナリオの開始時に常にステップを表示できれば、バックグラウンド ステップが正常に実行されたことを確認するのがはるかに簡単になります。この動作を有効にするにはどうすればよいですか?
Feature: Something
Scenario: a scenario
Given step 1
And step 2
When I do step 3
Then it works
Scenario: another scenario
Given step 1
And step 2
When I do a different step 3
Then it works