TDD style message expectations; in both RSpec and MiniTest
In most circumstances like this, there's a sort of MessageBoard. Let's create the idea of a MessageBoard class that both the engineer and the conductor know about.
- When the conductor sees trouble, the conductor tells the
message_board
to slow down - When the engineer slows down, the engineer tells the
message_board
confirm_slow_down
Use whichever mocking tool you liked the best or are interested in. If you don't know what to choose, go with RSpec.
Copyright: Jesse Wolgamott, MIT License (See LICENSE)