Sha256: 9e859d00f4161a0ecb5a7c18b9b98829b1450ad41f16c6047a61eed30b065e07

Contents?: true

Size: 603 Bytes

Versions: 6

Compression:

Stored size: 603 Bytes

Contents

require "fex/service"

describe Fex::Service do

  let(:client) { mock :client }

  before do
    Savon.stub(:client => client)
  end

  it "wraps Savon" do
    service = Fex::Service.new(
      name: :address_validation,
      defaults: { :default => "value" },
      response: Struct.new(:new)
    )
    Savon.should_receive(:client).with(wsdl: instance_of(String), convert_request_keys_to: :camelcase, pretty_print_xml: true)
    client.should_receive(:call).with(:address_validation, {:message=>{:default=>"value", :the=>"message"}})
    service.call(:address_validation, the: "message")
  end

end

Version data entries

6 entries across 6 versions & 1 rubygems

Version Path
fex-0.0.6 spec/unit/service_spec.rb
fex-0.0.5 spec/unit/service_spec.rb
fex-0.0.4 spec/unit/service_spec.rb
fex-0.0.3 spec/unit/service_spec.rb
fex-0.0.2 spec/unit/service_spec.rb
fex-0.0.1 spec/unit/service_spec.rb