diff --git a/spec/lib/washout_builder/dispatcher_spec.rb b/spec/lib/washout_builder/dispatcher_spec.rb index 33400a8..e02f6ba 100644 --- a/spec/lib/washout_builder/dispatcher_spec.rb +++ b/spec/lib/washout_builder/dispatcher_spec.rb @@ -5,7 +5,7 @@ soap_action 'dispatcher_method', :args => nil, :return => nil def dispatcher_method - raise SOAPError.new("some message", 1001) + #nothing end end @@ -23,9 +23,17 @@ def dispatcher_method WashoutBuilder::Document::Generator.expects(:new).with( :config => ApiController.soap_config, :service_class => ApiController, - :soap_actions => {'dispatcher_method' => - {:args => nil, :return => nil, :in => [], :out => [],:builder_in => [], :builder_out => [], :to => 'dispatcher_method'} - } + :soap_actions => {"dispatcher_method"=>{ + :args=>nil, + :return=>nil, + :in=>[], + :out=>[], + :to=>"dispatcher_method", + :response_tag=>"tns:dispatcher_methodResponse", + :builder_in=>[], + :builder_out=>[] + } + } ) get :_generate_doc end diff --git a/spec/lib/washout_builder_spec.rb b/spec/lib/washout_builder_spec.rb index 4358e7a..ba345dd 100644 --- a/spec/lib/washout_builder_spec.rb +++ b/spec/lib/washout_builder_spec.rb @@ -5,10 +5,10 @@ describe WashoutBuilder do before(:each) do - WashOut::Rails::Engine.config.wash_out[:wsdl_style] = 'rpc' - WashOut::Rails::Engine.config.wash_out[:parser] = :nokogiri - WashOut::Rails::Engine.config.wash_out[:catch_xml_errors] = true - WashOut::Rails::Engine.config.wash_out[:camelize_wsdl] = "lower" + WashOut::Engine.config.wash_out[:wsdl_style] = 'rpc' + WashOut::Engine.config.wash_out[:parser] = :nokogiri + WashOut::Engine.config.wash_out[:catch_xml_errors] = true + WashOut::Engine.config.wash_out[:camelize_wsdl] = "lower" end let :nori do @@ -558,12 +558,12 @@ def bad2 end lambda { savon(:bad) }.should raise_exception( - WashOut::ProgrammerError, + WashOut::Dispatcher::ProgrammerError, /SOAP response .*wyldness.*Array.*Hash.*stallion/ ) lambda { savon(:bad2) }.should raise_exception( - WashOut::ProgrammerError, + WashOut::Dispatcher::ProgrammerError, /SOAP response .*oops.*String.*telephone_booths.*Array/ ) end @@ -571,7 +571,7 @@ def bad2 context "custom exceptions" do let(:error_message) { "some message" } let(:error_code) { 1001 } - let(:soap_exception) { SOAPError.new(error_message,error_code) } + let(:soap_exception) { WashOut::Dispatcher::SOAPError.new(error_message,error_code) } before(:each) do # Savon::Response.raise_errors = false @@ -582,7 +582,7 @@ def bad2 soap_action 'bad', :args => nil, :return => nil def bad - raise SOAPError.new("some message", 1001) + raise WashOut::Dispatcher::SOAPError.new("some message", 1001) end end