Repository navigation
tests squiggly heredoc - #318
Merged
Merged
Conversation
sgarciac
commented
Oct 18, 2016
Contributor
- See Ruby 2.3 specs #175
- See [Feature 9098]
Contributor
Author
|
ouch, it breaks on rubies < 2.3, obviously. I'll come back with a new PR. |
Contributor
Author
|
I'm using eval now, to prevent syntax problems on rubies < 2.3 |
eregon
reviewed
Oct 19, 2016
| end | ||
|
|
||
| ruby_version_is "2.3" do | ||
| it "allows HEREDOC with <<~'identifier', allowing to indent identifier and content" do |
Member
There was a problem hiding this comment.
The variable (s) is not indented in this case 😉 , maybe add a couple spaces before s = ?
Alternatively, this could be a fixture file under language/fixtures to improve readability.
Member
There was a problem hiding this comment.
I see, you meant the heredoc identifier, not the variable.
I think it's worth moving this to a fixture and under a method (say StringSpec.squiggly) to improve readability and make it a more real-world example.
You can then require fixture(__FILE__, "squiggly_heredoc.rb") in this spec example.
* See #175 * See [Feature 9098]
Contributor
Author
|
new version |
Member
|
Well done, thanks! |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
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.