require 'fog/xml' require 'fog/aws/parsers/elb/describe_load_balancers' DESCRIBE_LOAD_BALANCERS_RESULT = <<-EOF 2013-08-01T15:47:20.930Z fog-test-elb 30 TCP:80 10 5 2 HTTP 80 HTTP 80 us-east-1a fog-test-elb-1965660309.us-east-1.elb.amazonaws.com Z3DZXE0Q79N41H internet-facing amazon-elb amazon-elb-sg fog-test-elb-1965660309.us-east-1.elb.amazonaws.com a6ea2117-fac1-11e2-abd3-1740ab4ef14e EOF Shindo.tests('AWS::ELB | parsers | describe_load_balancers', ['aws', 'elb', 'parser']) do tests('parses the xml').formats(AWS::ELB::Formats::DESCRIBE_LOAD_BALANCERS) do parser = Nokogiri::XML::SAX::Parser.new(Fog::Parsers::AWS::ELB::DescribeLoadBalancers.new) parser.parse(DESCRIBE_LOAD_BALANCERS_RESULT) parser.document.response end end