spec/ratis/next_bus_spec.rb in ratis-3.3.0 vs spec/ratis/next_bus_spec.rb in ratis-3.3.1

- old
+ new

@@ -94,11 +94,11 @@ expect(service.sign).to eq('0 CENTRAL North to Dunlap/3rd St.') expect(service.routetype).to eq('B') expect(service.times).to eq("05:49 AM, 06:09 AM, 06:29 AM, 06:49 AM") expect(service.direction).to eq('N') expect(service.servicetype).to eq('W') - expect(service.route).to eq('0') + expect(service.route).to eq('ZERO') expect(service.operator).to eq('AP') end it "should raise error if datetime condition is not a DateTime or Time" do lambda { @@ -148,11 +148,11 @@ it 'returns the next 4 bus times' do # raises exception when no runs available: # Ratis::Errors::SoapError: # SOAP - no runs available response = Ratis::NextBus.where(@conditions.dup) - expect(response.services).to have(2).items + expect(response.services.size).to be_within(2).of(3) end it 'only makes one request' do # false just to stop further processing of response Ratis::Request.should_receive(:get).once.and_call_original @@ -180,24 +180,24 @@ service = response.services.first expect(service).to be_a(OpenStruct) expect(service.status).to eq('N') - expect(service.sign).to eq('108 Elliot West To Priest') + expect(service.sign).to eq('108 Elliot/48th St West To 40th St/Pecos') expect(service.routetype).to eq('B') - expect(service.times).to eq("01:46 PM, 03:46 PM, 04:46 PM, 05:46 PM") + expect(service.times).to eq("07:07 AM, 03:07 PM, 03:37 PM, 04:07 PM") expect(service.direction).to eq('W') expect(service.servicetype).to eq('W') expect(service.route).to eq('108') expect(service.operator).to eq('FTE') service = response.services.last expect(service).to be_a(OpenStruct) expect(service.status).to eq('N') - expect(service.sign).to eq('108 Elliot West To Priest Via Sosmn/Bsnln') + expect(service.sign).to eq('108 Elliot/48th St West To 48th St/Chandler Via Sosmn/Bsnln') expect(service.routetype).to eq('B') - expect(service.times).to eq("02:46 PM, 06:46 PM") + expect(service.times).to eq("02:37 PM, 06:37 PM") expect(service.direction).to eq('W') expect(service.servicetype).to eq('W') expect(service.route).to eq('108') expect(service.operator).to eq('FTE') end