2019-06-11 22:24:35 +00:00
|
|
|
require "helper"
|
|
|
|
require "inspec/reporters"
|
2018-05-31 17:42:09 +00:00
|
|
|
|
|
|
|
describe Inspec::Reporters::Yaml do
|
|
|
|
let(:path) { File.expand_path(File.dirname(__FILE__)) }
|
|
|
|
let(:report) do
|
2019-06-11 22:24:35 +00:00
|
|
|
data = YAML.load_file(path + "/../mock/reporters/run_data.yml")
|
2018-05-31 17:42:09 +00:00
|
|
|
Inspec::Reporters::Yaml.new({ run_data: data })
|
|
|
|
end
|
|
|
|
|
2019-06-11 22:24:35 +00:00
|
|
|
describe "#render" do
|
|
|
|
it "confirm render output" do
|
|
|
|
output = File.read(path + "/../mock/reporters/yaml_output")
|
2018-05-31 17:42:09 +00:00
|
|
|
report.render
|
2019-09-30 22:31:55 +00:00
|
|
|
_(report.rendered_output).must_equal output
|
2018-05-31 17:42:09 +00:00
|
|
|
end
|
|
|
|
end
|
|
|
|
end
|