Class: NUnitTestRunner
- Inherits:
-
Object
- Object
- NUnitTestRunner
- Includes:
- Albacore::RunCommand, Albacore::Task
- Defined in:
- lib/albacore/nunittestrunner.rb
Constant Summary collapse
- TaskName =
:nunit
Instance Attribute Summary
Attributes included from Albacore::RunCommand
Attributes included from Logging
Instance Method Summary collapse
- #execute ⇒ Object
- #get_command_line ⇒ Object
- #get_command_parameters ⇒ Object
-
#initialize(command = nil) ⇒ NUnitTestRunner
constructor
A new instance of NUnitTestRunner.
Methods included from Albacore::RunCommand
Methods included from AttrMethods
Methods included from Albacore::Task
clean_dirname, create_rake_task, include_config, included
Methods included from UpdateAttributes
Methods included from YAMLConfig
#configure, #load_config_by_task_name
Methods included from Logging
#create_logger, #log_device=, #log_level, #log_level=
Methods included from Failure
Constructor Details
#initialize(command = nil) ⇒ NUnitTestRunner
Returns a new instance of NUnitTestRunner.
10 11 12 13 14 15 16 |
# File 'lib/albacore/nunittestrunner.rb', line 10 def initialize(command=nil) @options=[] @assemblies=[] super() update_attributes Albacore.configuration.nunit.to_hash @command = command unless command.nil? end |
Instance Method Details
#execute ⇒ Object
34 35 36 37 38 39 40 |
# File 'lib/albacore/nunittestrunner.rb', line 34 def execute() command_params = get_command_parameters result = run_command "NUnit", command_params.join(" ") = 'NUnit Failed. See Build Log For Detail' if !result end |
#get_command_line ⇒ Object
18 19 20 21 22 23 24 25 |
# File 'lib/albacore/nunittestrunner.rb', line 18 def get_command_line command_params = [] command_params << @command command_params << get_command_parameters commandline = command_params.join(" ") @logger.debug "Build NUnit Test Runner Command Line: " + commandline commandline end |
#get_command_parameters ⇒ Object
27 28 29 30 31 32 |
# File 'lib/albacore/nunittestrunner.rb', line 27 def get_command_parameters command_params = [] command_params << @options.join(" ") unless @options.nil? command_params << @assemblies.map{|asm| "\"#{asm}\""}.join(' ') unless @assemblies.nil? command_params end |