From 1fc2de8b4388d4b2b4ac179e6dc0809a6a03b45c Mon Sep 17 00:00:00 2001 From: Spike Grobstein Date: Sat, 31 Aug 2013 13:48:01 -0400 Subject: [PATCH] fixed the test to read a little better use a subshell to test the grep for DEBUG. --- test/bats.bats | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/test/bats.bats b/test/bats.bats index f6ec532..bef3ce9 100755 --- a/test/bats.bats +++ b/test/bats.bats @@ -112,9 +112,14 @@ fixtures bats } @test "test should not output DEBUG line if DEBUG is not set" { + export DEBUG=1 run bats "$FIXTURE_ROOT/debug.bats" [ $status -eq 0 ] - [[ ! $(echo $output | grep DEBUG) ]] + # [[ ! $(echo $output | grep DEBUG) ]] + echo $output | { + run grep DEBUG + [[ $status -ne 0 ]] + } } @test "test should output DEBUG line if DEBUG is set" {