(#7244) Fix test for non-zero-or-1 exit status
Merge pull request #2072 from kylog/issue/7244/spec-test-fixup

(#7244) Fix test for non-zero-or-1 exit status