require File.dirname(__FILE__) + '/../../test_helper' require 'graticule/cli' module Graticule class CliTest < Test::Unit::TestCase def setup URI::HTTP.responses = [] URI::HTTP.uris = [] end def test_start prepare_response(:success) Kernel.expects(:puts) Kernel.stubs(:puts) result = Graticule::Cli.start ['-s', 'yahoo', '-a', 'YahooDemo', 'Saugatuck,', 'MI'] end protected def prepare_response(id) URI::HTTP.responses << response('yahoo', id) end end end