Sha256: 611e80aaa0fcb5b38283b8f19833517a0f293817013e4b9d5cf0a3b0290aa41f

Contents?: true

Size: 759 Bytes

Versions: 5

Compression:

Stored size: 759 Bytes

Contents

require File.join(File.dirname(__FILE__), 'support', 'spec_helper')
require 'albacore/assemblyinfo'
require 'rake/assemblyinfotask'
require 'fail_patch'

describe "when running" do
  before :all do
  	assemblyinfo :assemblyinfo do |asm|
      asm.extend(FailPatch)    
  	  @yielded_object = asm
  	end
    Rake::Task["assemblyinfo"].invoke
  end
  
  it "should yield the assembly info api" do
    @yielded_object.kind_of?(AssemblyInfo).should == true 
  end
end

describe "when execution fails" do
  before :all do
  	assemblyinfo :failingtask do |asm|
  	  asm.extend(FailPatch)
  	  asm.fail
  	end
    Rake::Task["failingtask"].invoke
  end
  
  it "should fail the rake task" do
    $task_failed.should == true
  end
end

Version data entries

5 entries across 5 versions & 1 rubygems

Version Path
albacore-0.2.0.preview1 spec/assemblyinfotask_spec.rb
albacore-0.1.5 spec/assemblyinfotask_spec.rb
albacore-0.1.4 spec/assemblyinfotask_spec.rb
albacore-0.1.3 spec/assemblyinfotask_spec.rb
albacore-0.1.2 spec/assemblyinfotask_spec.rb