spec/ratis/request_spec.rb in ratis-3.4.3 vs spec/ratis/request_spec.rb in ratis-3.5.0
- old
+ new
@@ -1,48 +1,29 @@
require 'spec_helper'
describe Ratis::Request do
- before do
- Ratis.reset
- Ratis.configure do |config|
- config.endpoint = 'http://soap.valleymetro.org/cgi-bin-soap-web-262/soap.cgi'
- config.namespace = 'PX_WEB'
- end
- end
-
context 'new Requests get config from Ratis.configure block' do
it 'gets config from initializing' do
pending
Ratis::Request.client.wsdl.endpoint.should eql('http://soap.valleymetro.org/cgi-bin-soap-web-262/soap.cgi')
Ratis::Request.client.wsdl.namespace.should eql('PX_WEB')
end
end
context 'configured incorrectly' do
context 'without Ratis.configure being called' do
- before do
- Ratis.reset
- end
-
it 'raises an exception when initialized before configuring' do
+ expect(Ratis.config).to receive(:valid?).at_least(:once) { false }
expect do
Ratis::Request.get 'SomeAction'
end.to raise_error Ratis::Errors::ConfigError, 'It appears that Ratis.configure has not been called or properly setup'
end
end
end
end
describe Ratis::Request do
describe '#get' do
- before do
- Ratis.reset
- Ratis.configure do |config|
- config.endpoint = 'http://soap.valleymetro.org/cgi-bin-soap-web-262/soap.cgi'
- config.namespace = 'PX_WEB'
- end
- end
-
describe 'with no parameters' do
it 'only makes one request with the correct SOAP action' do
Ratis::Request.client.should_receive(:request) do |action, options|
action.should eq('Mymethod')