Sha256: 8f5c8f021156646de47e88b30c008535c17868aec8a196ca8e6b9771fa6d769f

Contents?: true

Size: 1.43 KB

Versions: 10

Compression:

Stored size: 1.43 KB

Contents

# encoding: UTF-8

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

10 entries across 10 versions & 1 rubygems

Version Path
shapewear-0.1.8 spec/shapewear/dsl_spec.rb
shapewear-0.1.7 spec/shapewear/dsl_spec.rb
shapewear-0.1.5 spec/shapewear/dsl_spec.rb
shapewear-0.1.4 spec/shapewear/dsl_spec.rb
shapewear-0.1.2 spec/shapewear/dsl_spec.rb
shapewear-0.1.1 spec/shapewear/dsl_spec.rb
shapewear-0.1.0 spec/shapewear/dsl_spec.rb
shapewear-0.0.6 spec/shapewear/dsl_spec.rb
shapewear-0.0.5 spec/shapewear/dsl_spec.rb
shapewear-0.0.4 spec/shapewear/dsl_spec.rb