sstephenson/bats — pull request #17 by spikegrobstein (2013-08-31 14:11:39+00:00)
Title: added decho function for debugging output

if DEBUG is defined, then when `decho` is called, it will output the given
string to the console, prefixed with '# DEBUG: '

This allows easier debugging of tests but still will conditionally
output said output.

example use:

the test:

@test "some test with decho" {
decho "the contents of some $VARIABLE"
test_something
}

calling `bats` on the commandline:

DEBUG=1 bats test/some_test.bats