Class: Nbuild::MSTestCmd

Inherits:
Cmd
  • Object
show all
Defined in:
lib/nbuild/mstest_cmd.rb

Instance Method Summary collapse

Methods inherited from Cmd

#execute, #execute_in

Constructor Details

#initialize(params = {}) ⇒ MSTestCmd

Returns a new instance of MSTestCmd.



5
6
7
8
# File 'lib/nbuild/mstest_cmd.rb', line 5

def initialize params={}
  @path = ENV['MSTEST_HOME'] || 'C:\Program Files\Microsoft Visual Studio 9.0\Common7\IDE'
  @params = params
end

Instance Method Details

#commandObject



10
11
12
13
14
15
# File 'lib/nbuild/mstest_cmd.rb', line 10

def command
   = "/testmetadata:\"#{@params[:testmetadata ]}\"" if @params[:testmetadata ]
  testlist = "/testlist:\"#{@params[:testlist]}\"" if @params[:testlist] 
  resultsfile = "/resultsfile:\"#{@params[:resultsfile]}\"" if @params[:resultsfile]
  "\"#{@path}\\mstest.exe\" #{} #{testlist} #{resultsfile}"
end