$:.unshift File.join(File.dirname(__FILE__), '..', '..', '..', 'lib', 'buildmaster') require 'spec' require 'windows/iis_driver' module BuildMaster context 'IIS Driver' do setup do @system = InMemorySystem.new @driver = IisDriver.new(Cotta.new(@system)) end specify 'should work on real system - requires IIS installed and not running' do @driver = IisDriver.new @driver.start @driver.status @driver.stop end specify 'should initiate start command' do @driver.start #@system.executed_commands[0].should_equal 'C:\WINDOWS\system32\iisreset.exe /start' @system.executed_commands[0].should_equal 'sc start W3SVC' end end end