inspec/test/unit/reporters/junit_test.rb
Clinton Wolfe 4e1c209d17 Make sure we test the legacy reporter in the unit test for junit
Signed-off-by: Clinton Wolfe <clintoncwolfe@gmail.com>
2020-09-22 11:40:01 +01:00

19 lines
698 B
Ruby

require "helper"
require_relative "../../../lib/plugins/inspec-reporter-junit/lib/inspec-reporter-junit"
require_relative "../../../lib/plugins/inspec-reporter-junit/lib/inspec-reporter-junit/reporter"
describe InspecPlugins::JUnitReporter::ReporterV1 do
let(:reporter) do
data = JSON.parse(File.read("test/fixtures/reporters/run_data.json"),
symbolize_names: true)
InspecPlugins::JUnitReporter::ReporterV1.new({ run_data: data })
end
describe "#render" do
it "confirm render output" do
junit_output = File.read("test/fixtures/reporters/junit_output")
reporter.render
_(reporter.rendered_output).must_equal junit_output
end
end
end