Sha256: dac04506b4c7a89e1ba8e29c98da4cd59d2677cc3309365e2e45ecc94b77b63e
Contents?: true
Size: 1.02 KB
Versions: 3
Compression:
Stored size: 1.02 KB
Contents
require 'spec_helper' describe Ratis::Area 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 '#all' do it 'only makes one request' do # false just to stop further processing of response Ratis::Request.should_receive(:get).once.and_call_original Ratis::Area.all end it 'requests the correct SOAP action with correct args' do Ratis::Request.should_receive(:get) do |action, options| action.should eq('Getareas') end.and_return(double('response', :success? => false)) Ratis::Area.all end it 'should return all areas' do pending areas = Ratis::Area.all areas.should have(29).items end it "should parse the area fields" do pending areas = Ratis::Area.all area = areas.last expect(area.area).to eq('YG') expect(area.description).to eq('Youngtown') end end end
Version data entries
3 entries across 3 versions & 1 rubygems
Version | Path |
---|---|
ratis-3.3.6 | spec/ratis/area_spec.rb |
ratis-3.3.5 | spec/ratis/area_spec.rb |
ratis-3.3.4 | spec/ratis/area_spec.rb |