Sha256: 13e8ac3023d5a71a8b8daa0cb8de7aee9774b8f9bf01c980e04a7d672809488a
Contents?: true
Size: 881 Bytes
Versions: 4
Compression:
Stored size: 881 Bytes
Contents
require 'spec_helper' require 'quick_travel/passenger_type' describe QuickTravel::PassengerType do context '#all' do subject(:all) do VCR.use_cassette('passenger_all') { QuickTravel::PassengerType.all } end its(:class) { should == Array } its(:length) { should == 3 } context 'first element' do subject { all.first } its(:class) { should == QuickTravel::PassengerType } its(:name) { should == 'Adult' } end end context '#passenger_count_to_s' do subject(:count) { QuickTravel::PassengerType.passenger_counts(hash) } context 'when passengers types have zero counts' do let(:hash) { { 1 => 2, 2 => 1, 3 => 0 } } it { should eq ['2 Adults', '1 Child'] } end context 'when passenger types are not specified' do let(:hash) { { 1 => 2 } } it { should eq ['2 Adults'] } end end end
Version data entries
4 entries across 4 versions & 1 rubygems