mirror of
https://github.com/inspec/inspec
synced 2024-11-13 00:17:08 +00:00
If there is no data, alwaya return an empty hash.
Signed-off-by: Clinton Wolfe <clintoncwolfe@gmail.com>
This commit is contained in:
parent
56c2416c57
commit
7516f959d1
2 changed files with 4 additions and 2 deletions
|
@ -263,7 +263,7 @@ module Inspec::Formatters
|
|||
# Waiver data, if available, is internally stored on a per-result
|
||||
# (that is, per-describe-block) basis, because that is the only granularity
|
||||
# available to us in the RSpec report data structure which we use as a vehicle.
|
||||
control[:waiver_data] = example.delete(:waiver_data)
|
||||
control[:waiver_data] ||= example[:waiver_data] || {}
|
||||
end
|
||||
end
|
||||
end
|
||||
|
|
|
@ -47,7 +47,9 @@ describe "waivers" do
|
|||
end
|
||||
|
||||
def refute_waiver_annotation(control_id)
|
||||
assert_nil waiver_data control_id
|
||||
act = waiver_data control_id
|
||||
assert_instance_of Hash, act
|
||||
assert_empty act
|
||||
end
|
||||
|
||||
def assert_skip_message(yea, nay)
|
||||
|
|
Loading…
Reference in a new issue