Sha256: 27ecc360e4e214b960db26064147e40f48172a7270b96a0f336229142da5c9da

Contents?: true

Size: 688 Bytes

Versions: 7

Compression:

Stored size: 688 Bytes

Contents

require 'spec_helper'
require 'earth/air/flight_distance_class_seat_class'

describe FlightDistanceClassSeatClass do
  describe "Sanity check", :sanity => true do
    let(:total) { FlightDistanceClassSeatClass.count }
    let(:short_econ) { FlightDistanceClassSeatClass.find('short haul economy') }
    
    it "should have all the data" do
      total.should == 7
    end
    
    # spot check
    it { short_econ.multiplier.should be_within(5e-5).of(0.9532) }
    
    describe '.fallback' do
      let(:fallback) { FlightDistanceClassSeatClass.fallback }
      it { fallback.name.should == 'fallback' }
      it { fallback.multiplier.should be_within(5e-5).of(1.0) }
    end
  end
end

Version data entries

7 entries across 7 versions & 1 rubygems

Version Path
earth-1.2.1 spec/earth/air/flight_distance_class_seat_class_spec.rb
earth-1.1.2 spec/earth/air/flight_distance_class_seat_class_spec.rb
earth-1.1.1 spec/earth/air/flight_distance_class_seat_class_spec.rb
earth-1.1.0 spec/earth/air/flight_distance_class_seat_class_spec.rb
earth-1.0.3 spec/earth/air/flight_distance_class_seat_class_spec.rb
earth-1.0.2 spec/earth/air/flight_distance_class_seat_class_spec.rb
earth-1.0.1 spec/earth/air/flight_distance_class_seat_class_spec.rb