4 class TestController < Test::Unit::TestCase
10 @history = mock('history')
11 @controller = Controller.new(@board, @history)
15 @history.expects(:add_move).once.with('state', 'move')
17 @board.notify_observers :new_move => { :state => 'state', :move => 'move' }
21 @history.expects(:back).returns(['state', 'move'])
22 @board.expects(:back).with('state', 'move')
27 @history.expects(:forward).returns(['state', 'move'])
28 @board.expects(:forward).with('state', 'move')
29 @controller.on_forward