ruby
ruby copied to clipboard
Transpose: change tests to use strings instead of heredocs
This came up in #929
I prefer to not have heredocs in tests before we introduced them in an exercise.
input = "ABC\n123"
# instead of the current
input = <<~INPUT.strip
ABC
123
INPUT
For reference:
not using indent_heredoc on transpose's generator, which is what generates the heredocs in the test files.
I agree. For some reason (likely some editor setting) the lines consisting white space + empty line, are automatically stripped of the whitespace causing those tests to fail for me.
![Screenshot 2019-04-23 10 48 14](https://user-images.githubusercontent.com/3275302/56563941-a4360380-65b5-11e9-96f6-603feaf63739.png)
If this is still a concern, I'd be happy to take a stab at a pull request on this one. I have a branch ready for review with an added case helper and updated test/case files.
Thanks @bergbergs Sounds great. Please do.
Closing, as this was fixed in #981