require 'fog/xml' require 'fog/aws/parsers/elbv2/create_load_balancer' CREATE_LOAD_BALANCER_RESULT = <<-EOF arn:aws:elasticloadbalancing:us-west-2:123456789012:loadbalancer/app/my-internal-load-balancer/50dc6c495c0c9188 internet-facing my-load-balancer vpc-3ac0fb5f Z2P70J7EXAMPLE 2016-03-25T21:29:48.850Z subnet-8360a9e7 us-west-2a subnet-b7d581c0 us-west-2b sg-5943793c my-load-balancer-424835706.us-west-2.elb.amazonaws.com provisioning application 32d531b2-f2d0-11e5-9192-3fff33344cfa EOF Shindo.tests('AWS::ELBV2 | parsers | create_load_balancer', %w[aws elb parser]) do tests('parses the xml').formats(AWS::ELBV2::Formats::CREATE_LOAD_BALANCER) do parser = Nokogiri::XML::SAX::Parser.new(Fog::Parsers::AWS::ELBV2::CreateLoadBalancer.new) parser.parse(CREATE_LOAD_BALANCER_RESULT) parser.document.response end end