Skip to content

ab-thomas/Airport_reloaded

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

11 Commits
 
 
 
 
 
 

Repository files navigation

Week 3 Test: Airport

Technologies used: RSpec, Ruby

Imagine you're writing software to control the flow of planes at an airport. The planes can land and take off provided that the weather is sunny. Occasionally it may be stormy, in which case no planes can land or take off.

Your task is to create a set of classes/modules to make the given test suite pass. You will need to use a random number generator to set the weather (it is normally sunny but on rare occasions it may be stormy). In your test, you'll need to use stubbing to override random weather. Finally, every plane must have a status indicating whether it's flying or has landed. You may expand on the original tests.

Basic functionality:

  • Planes are flying by default
  • Airport can be set with a certain capacity
  • Weather generated randomly
  • Planes can land if the weather is good
  • Planes cannot land if the weather is stormy
  • Planes cannot land if the aiport is full

###Rules Please create separate files for every class, module and test suite. Commit it to a repo on GitHub by 5pm.

The submission will be judged on the following criteria:

  • Tests pass
  • Test coverage is good
  • The code is elegant: every class has a clear responsibility, methods are short, etc.

The tests are located at: https://gist.github.com/shadchnev/5684064
Or the RSpec equivalent: https://gist.github.com/ecomba/2fb61ab115080599f8d8

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages