Sha256: 2f06c20821a9eb55f48e4710b3443f36146d318751b876db02966364d288dfe1

Contents?: true

Size: 819 Bytes

Versions: 2

Compression:

Stored size: 819 Bytes

Contents

require "albacore/albacoretask"
require "albacore/config/mspecconfig"

class MSpec
  TaskName = :mspec
  
  include Albacore::Task
  include Albacore::RunCommand
  include Configuration::MSpec

  attr_array    :assemblies
  
  attr_hash     :results_path
  
  def initialize()
    super()
    update_attributes(mspec.to_hash)
  end
  
  def execute()
    result = run_command("MSpec", build_parameters)
    fail_with_message("MSpec failed, see the build log for more details.") unless result
  end
  
  def build_parameters
    p = []
    p << @assemblies.map { |asm| "\"#{asm}\"" } if @assemblies
    p << "--#{@results_path.first.first} \"#{@results_path.first.last}\"" if @results_path
    p
  end

  def build_command_line
    c = []
    c << @command
    c << build_parameters
    c << @parameters
    c
  end
end

Version data entries

2 entries across 2 versions & 1 rubygems

Version Path
albacore-1.0.0 lib/albacore/mspec.rb
albacore-1.0.0.rc.3 lib/albacore/mspec.rb