Logo: Relish

  1. Sign in

Project: Cute-print 0.2.0

Pretty-print with source

Kernel#pp, if given a block, prints the source for the block and then
the pretty-printed result of running the block.

Scenarios
Label and pretty-print an object
Given
a file with:
require "cute_print"
a = [
  "Once upon a time there were four little Rabbits, and their names were",
  "Flopsy,",
  "Mopsy,",
  "Cotton-tail, and",
  "Peter.",
]
qq {a}
Then
stderr should be
a is ["Once upon a time there were four little Rabbits, and their names were",
      "Flopsy,",
      "Mopsy,",
      "Cotton-tail, and",
      "Peter."]

Last published about 7 years ago by Wayne Conrad.