inspec/test/integration/default/controls/xml_spec.rb
Jonathan Morley 3e7d47505c Add support for XML files (#2107)
* Add support for XML files

Signed-off-by: Morley, Jonathan <jmorley@cvent.com>

* Use REXML instead of nokogiri

Signed-off-by: Morley, Jonathan <jmorley@cvent.com>
2017-08-31 09:56:14 +02:00

12 lines
321 B
Ruby

# encoding: utf-8
if os.unix?
filename = '/tmp/example.xml'
else
filename = 'c:/windows/temp/example.xml'
end
describe xml(filename) do
its ('/breakfast_menu/food[1]/name') { should eq(['Belgian Waffles']) }
its ('/breakfast_menu/food/name') { should eq(['Belgian Waffles', 'Strawberry Belgian Waffles']) }
end