Sha256: 4514df6f0006f0b307eacf3bed1a2b866b70efd266eac81b42a6ced024b142ae
Contents?: true
Size: 1.03 KB
Versions: 5
Compression:
Stored size: 1.03 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', vcr: {} 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
5 entries across 5 versions & 1 rubygems
Version | Path |
---|---|
ratis-3.4.3 | spec/ratis/area_spec.rb |
ratis-3.4.2 | spec/ratis/area_spec.rb |
ratis-3.4.1 | spec/ratis/area_spec.rb |
ratis-3.4.0 | spec/ratis/area_spec.rb |
ratis-3.3.7 | spec/ratis/area_spec.rb |