BecaLParker / airport_challenge

Fly!
Other
0 stars 0 forks source link

Weather needs to be set by a random number generator #11

Closed BecaLParker closed 3 years ago

BecaLParker commented 3 years ago

"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 tests, you'll need to use a stub to override random weather to ensure consistent test behaviour."

BecaLParker commented 3 years ago

For overriding random weather behaviour, please read the documentation to learn how to use test doubles: https://www.relishapp.com/rspec/rspec-mocks/docs . There’s an example of using a test double to test a die that’s relevant to testing random weather in the test.

BecaLParker commented 3 years ago

weather mostly == sunny weather only occasionally == stormy

"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.

BecaLParker commented 3 years ago

https://github.com/BecaLParker/airport_challenge/commit/b2e42312557e82c001896de6840c96781e4ef68a