Skip to content
Browse files

fix error assertions

  • Loading branch information...
1 parent f6af8d8 commit ef979ea1c903cf35813a30f653c3d9295ad7691f @ddollar ddollar committed Jun 21, 2012
Showing with 3 additions and 2 deletions.
  1. +3 −2 vendor/test-utils/test-utils
View
5 vendor/test-utils/test-utils
@@ -113,8 +113,9 @@ assertCapturedError()
assertTrue "Expected captured exit code to be <${expectedErrorCode}>; was <${RETURN}>" "[ ${RETURN} -eq ${expectedErrorCode} ]"
fi
- assertFileContains "Expected STD_OUT to contain error <${expectedErrorMsg}>" "${expectedErrorMsg}" "${STD_OUT}"
- assertEquals "STD_ERR should always be empty" "" "$(cat ${STD_ERR})"
+ if [ "${expectedErrorMsg}" != "" ]; then
+ assertFileContains "Expected STD_ERR to contain error <${expectedErrorMsg}>" "${expectedErrorMsg}" "${STD_ERR}"
+ fi
}
assertAppDetected()

0 comments on commit ef979ea

Please sign in to comment.
Something went wrong with that request. Please try again.