2019-06-11 22:24:35 +00:00
|
|
|
require "helper"
|
2020-06-04 23:46:10 +00:00
|
|
|
require_relative "../../../lib/plugins/inspec-reporter-junit/lib/inspec-reporter-junit"
|
|
|
|
require_relative "../../../lib/plugins/inspec-reporter-junit/lib/inspec-reporter-junit/reporter"
|
2018-02-08 09:06:58 +00:00
|
|
|
|
2020-09-14 14:56:19 +00:00
|
|
|
describe InspecPlugins::JUnitReporter::ReporterV1 do
|
2020-06-04 23:46:10 +00:00
|
|
|
let(:reporter) do
|
2019-11-09 03:08:20 +00:00
|
|
|
data = JSON.parse(File.read("test/fixtures/reporters/run_data.json"),
|
|
|
|
symbolize_names: true)
|
2020-09-14 14:56:19 +00:00
|
|
|
InspecPlugins::JUnitReporter::ReporterV1.new({ run_data: data })
|
2018-02-08 09:06:58 +00:00
|
|
|
end
|
|
|
|
|
2019-06-11 22:24:35 +00:00
|
|
|
describe "#render" do
|
|
|
|
it "confirm render output" do
|
2020-06-04 23:46:10 +00:00
|
|
|
junit_output = File.read("test/fixtures/reporters/junit_output")
|
|
|
|
reporter.render
|
|
|
|
_(reporter.rendered_output).must_equal junit_output
|
2018-02-08 09:06:58 +00:00
|
|
|
end
|
|
|
|
end
|
|
|
|
end
|