Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
With this patch,
DocString
objects are now trueString
objects, and not aCucumber::MultilineArgument::DocString
object.I understand that the intention with
Cucumber::MultilineArgument::DocString
is that it behaves just like aString
, but it doesn't. For example,expect(some_string).to eq(some_doc_string)
causes an unreadable error message with aDocString
, but a nice one (with a diff) for aString
.Furthermore,
DocString
is an implementation detail of Cucumber that users shouldn't be concerned with. In DDD speak, these are two (or perhaps three) different bounded contexts: Parsing, (Execution) and user code.A side-effect of this change is that the
content_type
attribute is no longer available. That's fine - I can't think of a reason why users would need this. Thecontent_type
is purely intended for tools that render Gherkin, and I'm not aware of any tools using it yet.When those tools exist, the Gherkin3 library should be used to parse the Gherkin document (without Cucumber), and the
content_type
will be available from the Gherkin3 AST.Finally, I removed the
doc_string
method fromWorld
- it's not needed, as passing a plainString
is sufficient.