mirror of
https://github.com/inspec/inspec
synced 2024-11-24 05:33:17 +00:00
07dc5e3192
3 files left to go, and they're behaving oddly so I'm leaving them out in this pass. Looks like 21 deprecations left. Signed-off-by: Ryan Davis <zenspider@chef.io>
34 lines
1.1 KiB
Ruby
34 lines
1.1 KiB
Ruby
require "functional/helper"
|
|
require "inspec/runner"
|
|
require "inspec/resources/file"
|
|
|
|
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
|
|
|
|
it "loads a json report twice" do
|
|
skip "this doesn't work yet, but I'd like to poke at it"
|
|
|
|
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
|