Sha256: e6d6be63d78568954cd78e7b3f6fee5c04d73cb4ba2611eb90ded981f23a30d6

Contents?: true

Size: 623 Bytes

Versions: 31

Compression:

Stored size: 623 Bytes

Contents

require 'test_helper'

class GetTimeTableTest < Minitest::Test

  def get_time_table
    Gillbus::GetTimeTable::Response.parse_string(File.read('test/responses/getTimeTable.xml'))
  end

  def test_response
    first_trip, second_trip = get_time_table.trips

    assert first_trip.segments.size > 0
    # assert_equal [1, 6], first_trip.days_of_week
    assert_equal [:sunday, :friday], first_trip.days_of_week

    # { :monday => 0, :tuesday => 1, :wednesday => 2, :thursday => 3, :friday => 4, :saturday => 5, :sunday => 6 }

    assert second_trip.dates.size > 0
    assert Date, second_trip.dates.first.class
  end
end

Version data entries

31 entries across 31 versions & 1 rubygems

Version Path
gillbus-0.16.7 test/get_time_table_test.rb
gillbus-0.16.6 test/get_time_table_test.rb
gillbus-0.16.5 test/get_time_table_test.rb
gillbus-0.16.4 test/get_time_table_test.rb
gillbus-0.16.3 test/get_time_table_test.rb
gillbus-0.16.2 test/get_time_table_test.rb
gillbus-0.16.1 test/get_time_table_test.rb
gillbus-0.15.7 test/get_time_table_test.rb
gillbus-0.15.6 test/get_time_table_test.rb
gillbus-0.15.5 test/get_time_table_test.rb
gillbus-0.15.4 test/get_time_table_test.rb
gillbus-0.15.3 test/get_time_table_test.rb
gillbus-0.15.2 test/get_time_table_test.rb
gillbus-0.15.1 test/get_time_table_test.rb
gillbus-0.15.0 test/get_time_table_test.rb
gillbus-0.14.12 test/get_time_table_test.rb
gillbus-0.14.11 test/get_time_table_test.rb
gillbus-0.14.10 test/get_time_table_test.rb
gillbus-0.14.9 test/get_time_table_test.rb
gillbus-0.14.8 test/get_time_table_test.rb