text: 'use strict';
  
  describe('Feature Test:', function (){
    var plane;
    var airport;
  
    beforeEach(function(){
      plane = new Plane();
      airport = new Airport();
    });
  
    it('planes can be istructed to land at an airport', function(){
      plane.land(airport);
      expect(airport.planes()).toContain(plane);
    });
  
    it('planes can be instructed to takeoff', function(){
      plane.land(airport)
      plane.takeoff();
      expect(airport.planes()).not.toContain(plane);
    });
  
    it("planes can't take off in stormy weather", function (){
      plane.land(airport)
      spyOn(airport, 'isStormy').and.returnValue(true);
      expect(function(){ plane.takeoff();}).toThrowError('cannot takeoff during storm');
      expect(airport.planes()).toContain(plane);
    });
  });
  