Sha256: 9006e46771e51b6ce142c210eae3dd9dacbe9005c6fd2450ec172f20d3192b51

Contents?: true

Size: 766 Bytes

Versions: 2

Compression:

Stored size: 766 Bytes

Contents

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

describe Albacore::PLinkTask, "when running" do
	before :all do
		task = Albacore::PLinkTask.new(:plink) do |t|
			@yielded_object = t
		end
		task.extend(TasklibPatch)
		Rake::Task[:plink].invoke
	end

	it "should yield the command api" do
		@yielded_object.kind_of?(PLink).should == true 
	end
end

describe Albacore::PLinkTask, "when execution fails" do
	before :all do
		@task = Albacore::PLinkTask.new(:plink_failingtask)
		@task.extend(TasklibPatch)
		@task.fail
		Rake::Task[:plink_failingtask].invoke
	end

	it "should fail the rake task" do
		@task.task_failed.should be_true
	end
end

Version data entries

2 entries across 2 versions & 1 rubygems

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