mirror of
https://github.com/inspec/inspec
synced 2024-12-11 22:02:47 +00:00
317a6d1953
* Adding YAML reporter * Updating yaml o/p * Removing comment * Adding UT for YAML reporter, adding missing reporters * This PR takes care of the following: - Fixes the YAML reporter UT - Adds the report method to YAML reporter to support code example as in #3085 - Disables the cyclomatic complexity Metric for reporter Signed-off-by: Noel Georgi <18496730+frezbo@users.noreply.github.com>
19 lines
485 B
Ruby
19 lines
485 B
Ruby
# encoding: utf-8
|
|
|
|
require 'helper'
|
|
|
|
describe Inspec::Reporters::Yaml do
|
|
let(:path) { File.expand_path(File.dirname(__FILE__)) }
|
|
let(:report) do
|
|
data = YAML.load_file(path + '/../mock/reporters/run_data.yml')
|
|
Inspec::Reporters::Yaml.new({ run_data: data })
|
|
end
|
|
|
|
describe '#render' do
|
|
it 'confirm render output' do
|
|
output = File.read(path + '/../mock/reporters/yaml_output')
|
|
report.render
|
|
report.rendered_output.must_equal output
|
|
end
|
|
end
|
|
end
|