spec/ratis/next_bus_spec.rb in ratis-3.1.8 vs spec/ratis/next_bus_spec.rb in ratis-3.2.0
- old
+ new
@@ -6,11 +6,11 @@
Ratis.configure do |config|
config.endpoint = 'http://soap.valleymetro.org/cgi-bin-soap-web-252/soap.cgi'
config.namespace = 'PX_WEB'
end
- @time = Chronic.parse('tomorrow at 6am')
+ @time = Chronic.parse('next monday at 6am')
end
let(:empty_body){ {:nextbus_response => {:atstop => {:service => []}}} }
describe '#success?' do
@@ -18,10 +18,17 @@
pending
end
end
describe '#where' do
+ # TODO: Light Rails Stops can return 2 Atstop tags... how do we best handle this case
+ describe 'Light Rails stops' do
+ it "description" do
+ pending
+ end
+ end
+
describe 'time formatting' do
it 'should make requests with 24 hour time format' do
@stop_id = 10050
@time = Chronic.parse('tomorrow at 3pm')
@conditions = {:stop_id => @stop_id,
@@ -129,10 +136,11 @@
end
describe 'multiple services returned' do
before do
@stop_id = 15894
+ @time = Chronic.parse('next monday at 3pm')
@conditions = {:stop_id => @stop_id,
:app_id => 'ratis-specs', # a short string that can be used to separate requests from different applications or different modules with
:type => 'N',
:datetime => @time }
end
@@ -174,11 +182,11 @@
expect(service).to be_a(OpenStruct)
expect(service.status).to eq('N')
expect(service.sign).to eq('108 Elliot West To Priest')
expect(service.routetype).to eq('B')
- expect(service.times).to eq("06:46 AM, 07:46 AM, 08:46 AM, 09:46 AM")
+ expect(service.times).to eq("01:46 PM, 03:46 PM, 04:46 PM, 05:46 PM")
expect(service.direction).to eq('W')
expect(service.servicetype).to eq('W')
expect(service.route).to eq('108')
expect(service.operator).to eq('AT')
@@ -186,10 +194,10 @@
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.routetype).to eq('B')
- expect(service.times).to eq("10:46 AM, 02:46 PM, 06:46 PM")
+ expect(service.times).to eq("02:46 PM, 06:46 PM")
expect(service.direction).to eq('W')
expect(service.servicetype).to eq('W')
expect(service.route).to eq('108')
expect(service.operator).to eq('AT')
end