lib/resources/json.rb in inspec-3.7.1 vs lib/resources/json.rb in inspec-3.7.11
- old
+ new
@@ -6,11 +6,11 @@
module Inspec::Resources
class JsonConfig < Inspec.resource(1)
name 'json'
desc 'Use the json InSpec audit resource to test data in a JSON file.'
- example "
+ example <<~EXAMPLE
describe json('policyfile.lock.json') do
its(['cookbook_locks','omnibus','version']) { should eq('2.2.0') }
end
describe json({ command: 'retrieve_data.py --json' }) do
@@ -18,11 +18,10 @@
end
describe json({ content: '{\"item1\": { \"status\": \"available\" } }' }) do
its(['item1', 'status']) { should cmp 'available' }
end
-
- "
+ EXAMPLE
include ObjectTraverser
include FileReader
# make params readable