ruby icon indicating copy to clipboard operation
ruby copied to clipboard

Transpose: change tests to use strings instead of heredocs

Open emcoding opened this issue 5 years ago • 3 comments

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.

emcoding avatar Mar 25 '19 16:03 emcoding

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

goalaleo avatar Apr 23 '19 07:04 goalaleo

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.

jbergenson avatar Aug 01 '19 14:08 jbergenson

Thanks @bergbergs Sounds great. Please do.

emcoding avatar Aug 01 '19 14:08 emcoding

Closing, as this was fixed in #981

kytrinyx avatar Oct 12 '22 22:10 kytrinyx