Sha256: e71629073db229bb0a03643dc68d81a5b0d2ce6f052b945368c163a506f94742

Contents?: true

Size: 815 Bytes

Versions: 3

Compression:

Stored size: 815 Bytes

Contents

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

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

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

Version data entries

3 entries across 3 versions & 1 rubygems

Version Path
albacore-0.0.9 spec/assemblyinfotask_spec.rb
albacore-0.0.8 spec/assemblyinfotask_spec.rb
albacore-0.0.7 spec/assemblyinfotask_spec.rb