Added functional tests for inspec version --format json

Signed-off-by: Adam Leff <adam@leff.co>
This commit is contained in:
Adam Leff 2017-05-17 09:41:38 -04:00
parent 1aa223c99b
commit 0d91fefd6a
No known key found for this signature in database
GPG key ID: 7A5136DE1C1112F8

View file

@ -41,6 +41,13 @@ describe 'command tests' do
out.exit_status.must_equal 0
out.stdout.must_equal Inspec::VERSION+"\n"
end
it 'prints the version as JSON when the format is specified as JSON' do
out = inspec('version --format=json')
out.stderr.must_equal ''
out.exit_status.must_equal 0
out.stdout.must_equal %({"version":"#{Inspec::VERSION}"}\n)
end
end
describe 'check' do