mirror of
https://github.com/inspec/inspec
synced 2024-12-25 12:33:25 +00:00
23 lines
631 B
Ruby
23 lines
631 B
Ruby
|
# encoding: utf-8
|
||
|
|
||
|
require 'functional/helper'
|
||
|
|
||
|
describe 'inspec report tests' do
|
||
|
include FunctionalHelper
|
||
|
|
||
|
describe 'report' do
|
||
|
it 'loads a json report' do
|
||
|
o = { 'reporter' => ['json'], 'report' => true }
|
||
|
runner = ::Inspec::Runner.new(o)
|
||
|
runner.add_target(example_profile)
|
||
|
runner.run
|
||
|
runner.report.count.must_equal 4
|
||
|
runner.report.inspect.must_include ':title=>"InSpec Example Profile"'
|
||
|
runner.report.inspect.must_include ':status=>"passed"'
|
||
|
end
|
||
|
|
||
|
# Due to the way we require/use rspec, you can only run one runner.
|
||
|
# You have to reload rspec to run another.
|
||
|
end
|
||
|
end
|