Sha256: 7a8b8ff47e78172d94bd58116922e37a556e3ba563046aa7d3cfb980244cd1f1

Contents?: true

Size: 1.44 KB

Versions: 15

Compression:

Stored size: 1.44 KB

Contents

require 'spec_helper'
require 'support/sh_interceptor'
require 'albacore'
require 'albacore/task_types/build'

describe 'build config' do
  subject do
    Albacore::Build::Config.new
  end
  %w[files= file= sln= target target= logging logging= prop cores cores= tools_version tools_version=].each do |writer|
    it "should respond to :#{writer}" do
      expect(subject).to respond_to(:"#{writer}")
    end
  end
  it 'should not have any property' do
    expect(subject).to_not respond_to(:something_nonexistent)
  end

  describe 'when setting properties' do
    before do
      subject.logging = 'minimal'
      subject.tools_version = '3.5'
    end
    it do
      expect(subject.parameters).to include('/verbosity:minimal')
      expect(subject.parameters).to include('/toolsversion:3.5')
    end
  end
end

describe 'when running with sln' do
  let :cfg do
    Albacore::Build::Config.new
  end

  include_context 'path testing'

  let(:cmd) do
    cmd = Albacore::Build::Cmd.new cfg.work_dir, 'xbuild', cfg.parameters
    cmd.extend ShInterceptor
  end

  before do
    cfg.sln = 'src/HelloWorld.sln'
    cfg.params_for_file cfg.sln
    cfg.target = %w|Clean Build|
    cmd.execute
  end

  subject do
    cmd
  end

  it do
    expect(subject.executable).to eq('xbuild')
  end
  it do
    expect(subject.parameters).to eq(%W|/verbosity:minimal #{path 'src/HelloWorld.sln'} /target:Clean;Build|)
  end
  it do
    expect(subject.is_mono_command?).to be false
  end
end

Version data entries

15 entries across 15 versions & 1 rubygems

Version Path
albacore-3.0.1 spec/build_spec.rb
albacore-3.0.0.pre.alpha.6 spec/build_spec.rb
albacore-3.0.0.pre.alpha.5 spec/build_spec.rb
albacore-3.0.0.pre.alpha.4 spec/build_spec.rb
albacore-3.0.0.pre.alpha.3 spec/build_spec.rb
albacore-3.0.0.pre.alpha.2 spec/build_spec.rb
albacore-3.0.0.pre.alpha spec/build_spec.rb
albacore-2.8.0 spec/build_spec.rb
albacore-2.7.0 spec/build_spec.rb
albacore-2.6.8 spec/build_spec.rb
albacore-2.6.7 spec/build_spec.rb
albacore-2.6.6 spec/build_spec.rb
albacore-2.6.4 spec/build_spec.rb
albacore-2.6.3 spec/build_spec.rb
albacore-2.6.2 spec/build_spec.rb