Sha256: bd856ff2ee3c98d3018ea996313d3b7d08ffd1f1f8f9412023610fae69ce8370

Contents?: true

Size: 1.35 KB

Versions: 18

Compression:

Stored size: 1.35 KB

Contents

require 'albacore/task_types/asmver'

describe ::Albacore::Asmver::Config, 'when setting attributes and out' do
  let :strio do
    StringIO.new
  end
  subject do
    ::Albacore::Asmver::Config.new
  end
  def task
    @task
  end
  before :each do
    subject.file_path = 'Version.fs'
    subject.namespace = 'Hello.World'
    subject.attributes guid: 'b766f4f3-3f4e-49d0-a451-9c152059ae81',
      assembly_version: '0.1.2'
    subject.out = strio
    @task = ::Albacore::Asmver::Task.new(subject.opts)
    @task.execute
  end
  it 'should write namespace' do
    strio.string.should include('namespace Hello.World')
  end
  it 'should write Guid("...")' do
    strio.string.should include('[<assembly: Guid("b766f4f3-3f4e-49d0-a451-9c152059ae81")>]')
  end
  it 'should write AssemblyVersion' do
    strio.string.should include('[<assembly: AssemblyVersion("0.1.2")>]')
  end
  it 'should allow changing attributes' do
    expect(subject).to respond_to :change_attributes
  end
  it 'should allow reading namespace' do
    expect(subject.namespace).to eq 'Hello.World'
  end
  it 'should allow reading file_path' do
    expect(subject.file_path).to eq 'Version.fs'
  end
  it 'should allow getting and setting attributes' do
    subject.change_attributes do |as|
      as[:a_key] = '123'
    end
    expect(subject.change_attributes { |a| a[:a_key] }).to eq '123'
  end
end

Version data entries

18 entries across 18 versions & 1 rubygems

Version Path
albacore-2.4.2 spec/asmver_task_spec.rb
albacore-2.4.1 spec/asmver_task_spec.rb
albacore-2.4.0 spec/asmver_task_spec.rb
albacore-2.3.22 spec/asmver_task_spec.rb
albacore-2.3.21 spec/asmver_task_spec.rb
albacore-2.3.20 spec/asmver_task_spec.rb
albacore-2.3.19 spec/asmver_task_spec.rb
albacore-2.3.18 spec/asmver_task_spec.rb
albacore-2.3.17 spec/asmver_task_spec.rb
albacore-2.3.16 spec/asmver_task_spec.rb
albacore-2.3.15 spec/asmver_task_spec.rb
albacore-2.3.14 spec/asmver_task_spec.rb
albacore-2.3.13 spec/asmver_task_spec.rb
albacore-2.3.12 spec/asmver_task_spec.rb
albacore-2.3.11 spec/asmver_task_spec.rb
albacore-2.3.10 spec/asmver_task_spec.rb
albacore-2.3.9 spec/asmver_task_spec.rb
albacore-2.3.8 spec/asmver_task_spec.rb