require File.join(File.dirname(__FILE__), "..", "helper") class SoapEnvelopeTest < Test::Unit::TestCase context "Calling soap_envelope" do setup { ApricotEatsGorilla.sort_keys = true } context "without parameter and block" do should "returns a SOAP envelope without body content" do expected = '' << '' result = ApricotEatsGorilla.soap_envelope assert_equal expected, result end end context "with a Hash containing a custom namespace and a block" do should "returns a SOAP envelope with custom namespace and body content" do expected = '' << '123' result = ApricotEatsGorilla.soap_envelope "wsdl" => "http://example.com" do "123" end assert_equal expected, result end end end end