Sha256: 6ca79ecc629b44d05a83c4377ed01dc91dec5c4380a83e844d4a728bf7373b73

Contents?: true

Size: 776 Bytes

Versions: 2

Compression:

Stored size: 776 Bytes

Contents

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

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

describe Albacore::MSpecTask, "when execution fails" do
	before :all do
		@task = Albacore::MSpecTask.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

2 entries across 2 versions & 1 rubygems

Version Path
albacore-0.0.9 spec/mspectask_spec.rb
albacore-0.0.8 spec/mspectask_spec.rb