Sha256: fafd6d5ea9be0a4691d0433b44b8e67de84dd26a60ac932f96af93a499627dd3

Contents?: true

Size: 787 Bytes

Versions: 2

Compression:

Stored size: 787 Bytes

Contents

require File.join(File.dirname(__FILE__), 'support', 'spec_helper')
require 'albacore/nant'
require 'rake/nanttask'
require 'tasklib_patch'

describe Albacore::NAntTask, "when running" do
  before :all do
    task = Albacore::NAntTask.new(:nant) do |t|
      @yielded_object = t
    end
    task.extend(TasklibPatch)
    Rake::Task[:nant].invoke
  end
  
  it "should yield the nant api" do
    @yielded_object.kind_of?(NAnt).should == true 
  end
end

describe Albacore::NAntTask, "when execution fails" do
  before :all do
    @task = Albacore::NAntTask.new(:nant_failingtask)
    @task.extend(TasklibPatch)
    @task.fail
    Rake::Task[:nant_failingtask].invoke
  end
  
  it "should fail the rake task" do
    @task.task_failed.should == true
  end
end

Version data entries

2 entries across 2 versions & 1 rubygems

Version Path
albacore-0.1.1 spec/nanttask_spec.rb
albacore-0.1.0 spec/nanttask_spec.rb