2019-06-11 22:24:35 +00:00
|
|
|
require "helper"
|
|
|
|
require "inspec/reporters"
|
2018-02-08 09:06:58 +00:00
|
|
|
|
2018-04-12 13:59:34 +00:00
|
|
|
describe Inspec::Reporters::Junit do
|
|
|
|
let(:report) do
|
2019-11-09 03:08:20 +00:00
|
|
|
data = JSON.parse(File.read("test/fixtures/reporters/run_data.json"),
|
|
|
|
symbolize_names: true)
|
2018-02-08 09:06:58 +00:00
|
|
|
Inspec::Reporters::Junit.new({ run_data: data })
|
|
|
|
end
|
|
|
|
|
2019-06-11 22:24:35 +00:00
|
|
|
describe "#render" do
|
|
|
|
it "confirm render output" do
|
2019-11-09 03:08:20 +00:00
|
|
|
cli_output = File.read("test/fixtures/reporters/junit_output")
|
2018-02-08 09:06:58 +00:00
|
|
|
report.render
|
2019-09-30 22:31:55 +00:00
|
|
|
_(report.rendered_output).must_equal cli_output
|
2018-02-08 09:06:58 +00:00
|
|
|
end
|
|
|
|
end
|
|
|
|
end
|