Sha256: 417eaf2cc093328567a2f8eae5116dc799a76de49cb2e7c3ac521300583c52d8
Contents?: true
Size: 1.23 KB
Versions: 6
Compression:
Stored size: 1.23 KB
Contents
require 'albacore/support/albacore_helper' class MSpecTestRunner extend AttrMethods include RunCommand include YAMLConfig attr_accessor :html_output attr_array :assemblies, :options def initialize(path_to_command='') @path_to_command = path_to_command @assemblies=[] super() end def get_command_line command = [] command << @path_to_command command << get_command_parameters cmd = command.join(" ") @logger.debug "Build MSpec Test Runner Command Line: " + cmd return cmd end def get_command_parameters command_params = [] command_params << build_assembly_list unless @assemblies.empty? command_params << @options.join(" ") unless @options.nil? command_params << build_html_output unless @html_output.nil? command_params end def execute() command_params = get_command_parameters result = run_command "MSpec", command_params.join(" ") failure_message = 'MSpec Failed. See Build Log For Detail' fail_with_message failure_message if !result end def build_assembly_list @assemblies.map{|asm| "\"#{asm}\""}.join(" ") end def build_html_output "--html #{@html_output}" end end
Version data entries
6 entries across 6 versions & 1 rubygems