Refactored unit test to be more like the other one.

Signed-off-by: Ryan Davis <zenspider@chef.io>
This commit is contained in:
Ryan Davis 2019-10-09 17:41:03 -07:00
parent 26ffea8d39
commit f9ec3053aa

View file

@ -14,8 +14,12 @@ describe Inspec::Reporters::JsonAutomate do
describe "#render" do
it "confirms render output" do
output = File.read(path + "/../mock/reporters/json_merged_output")
output = JSON.parse(output, symbolize_names: true)
report.render
_(JSON.parse(report.rendered_output)).must_equal JSON.parse(output)
actual = JSON.parse(report.rendered_output, symbolize_names: true)
_(actual).must_equal output
end
end