require 'fog/xml' require 'fog/aws/parsers/compute/describe_images' DESCRIBE_IMAGES_RESULT = <<-EOF 180a8433-ade0-4a6c-b35b-107897579572 aki-02486376 ec2-public-images-eu/vmlinuz-2.6.21-2.fc8xen-ec2-v1.0.i386.aki.manifest.xml available 206029621532 true i386 kernel amazon instance-store paravirtual xen EOF Shindo.tests('AWS::Compute | parsers | describe_images', %w[compute aws parser]) do tests('parses the xml').formats(AWS::Compute::Formats::DESCRIBE_IMAGES) do parser = Nokogiri::XML::SAX::Parser.new(Fog::Parsers::AWS::Compute::DescribeImages.new) parser.parse(DESCRIBE_IMAGES_RESULT) parser.document.response end end