Commit 77e6b61

mo k <mo@mokhan.ca>
2012-08-13 00:09:43
move command processor to constructor and set a default.
1 parent 25c79d4
Changed files (1)
lib/console.rb
@@ -2,10 +2,10 @@ require 'navigate_rover'
 require "command_processor"
 
 class Console
-  def initialize(input, output)
+  def initialize(input, output, processor = CommandProcessor.new)
     @input = input
     @output = output
-    @processor = CommandProcessor.new
+    @processor = processor
   end
   def run
     plateau = ask('enter size of plateau:')