gabrielfalcao/lettuce — pull request #314 by ryanuber (2013-01-12 19:35:01+00:00)
Title: Additional raw_multiline attribute for lettuce.core.Step

It is important to have the ability to throw arbitrary text into a unit test, and due to the current mechanism that strips whitespace and the first quote from each line inside of Step.multiline, that is not possible. Consider the following:

I have the following JSON:
"""
[
"first element",
"second element"
]
"""

This will not return you the correct JSON because it will strip the beginning quotes. It's possible to double-quote strings to preserve space, but that makes inserting the JSON (or whatever data it is you are working with) much more painful.

This pull request adds the ability to call step.raw_multiline, which will return you the exact data, including all leading whitespace and quotes, within the block enclosed by """.