Sha256: a08c52c01877661a3ec76dabbe95028f7d3d08aa369b47d740dfe36d899c3f65
Contents?: true
Size: 669 Bytes
Versions: 12
Compression:
Stored size: 669 Bytes
Contents
require 'active_support/core_ext/hash/conversions' require File.expand_path 'app/specs/spec_helper' describe "Template tests",:template do before(:all) do client = Savon.client(wsdl: "http://www.webservicex.net/stockquote.asmx?WSDL", #:basic_auth => [$config["user"]["name"], $config["user"]["password"]], :log_level => :error) response = client.call(:get_quote, message: { symbol: "Goog"}) # Create a hash out of the response @hashedResponse = Hash.from_xml(response.to_hash[:get_quote_response][:get_quote_result]) end it 'returns the symbol' do expect(@hashedResponse["StockQuotes"]["Stock"]["Symbol"]).to eq "GOOG" end end
Version data entries
12 entries across 12 versions & 1 rubygems