Join GitHub today
GitHub is home to over 28 million developers working together to host and review code, manage projects, and build software together.Sign up
Pretty Formatter Fails When Printing Expanded Scenario Outline #620
It appears that
Given a feature like this:
And cucumber is run like this:
It raises an error like this:
I tried creating a failing feature in the 1.3.x branch, but was unable to get it to fail. I haven't got time to look into this further at the moment. With any luck, someone more familiar with the code will have some idea what's going wrong. I'll try to dig deeper when I get a chance.
I created a branch with a new feature here:
I just noticed that cucumber doesn't use ActiveSupport for indenting strings. I think the problem is that ActiveSupport chokes on a negative argument to indent, while the cucumber version gives it the old college try. This would explain why the test doesn't fail.
Some options to fix this:
The first option will allow the comments to line up as intended. The second option is easier to implement and results in consistent formatting no matter what the monkeys have been patching.
This issue is fixed in v2.0.0.beta.1 (more specifically by cucumber/cucumber@84eb09c). The guard that ensures that the argument to indent is >= 1 is here.