Sha256: aeef3702a56ae675b18ded2eca611f0f3e250c2d407f6ac310aa492e8c7aaa5d

Contents?: true

Size: 1.41 KB

Versions: 1

Compression:

Stored size: 1.41 KB

Contents

require "spec_helper"

describe Shapewear::DSL do

  let(:xmlns) { {'wsdl' => 'http://schemas.xmlsoap.org/wsdl/', 'soap' => 'http://schemas.xmlsoap.org/wsdl/soap/'} }

  describe "basic DSL" do
    it "should describe a minimal working service" do
      wsdl = MinimalWorkingService.to_wsdl
      puts wsdl

      # wsdl should be valid XML (duh!)
      expect { Nokogiri::XML(wsdl) { |c| c.strict } }.not_to raise_error

      # wasabi should be able to parse it
      wdoc = nil
      expect { wdoc = Wasabi.document wsdl }.not_to raise_error

      wdoc.namespace.should match /MinimalWorkingService/
      wdoc.soap_actions.should == [:hello_world]

      wdoc.operations[:hello_world].should_not be_nil
      wdoc.operations[:hello_world][:input].should == 'HelloWorld'
      wdoc.operations[:hello_world][:input].should match /HelloWorld$/
    end
  end

  describe "complex types DSL" do
    it "should accept complex types as input"
    it "should accept complex types as output"
    it "should accept arrays as input"
    it "should accept arrays as output"
    it "should allow definition of complex types using class introspection"
    it "should allow definition of complex types using a DSL"
  end

  describe "WSDL customization" do
    it "should allow customization of target namespace"
    it "should allow customization of schema namespace"
  end

  describe "existing WSDL" do
    it "should accept an existing WSDL"
  end
end

Version data entries

1 entries across 1 versions & 1 rubygems

Version Path
shapewear-0.0.3 spec/shapewear/dsl_spec.rb