Module: Rake::DevEiate::Specs

Defined in:
lib/rake/deveiate/specs.rb

Overview

Testinug specification tasks

Instance Method Summary collapse

Instance Method Details

#define_tasksObject

Define documentation tasks



12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
# File 'lib/rake/deveiate/specs.rb', line 12

def define_tasks
	super if defined?( super )


	if Rake::DevEiate::SPEC_DIR.exist?
		task :test => :spec

		desc "Run unit tests"
		RSpec::Core::RakeTask.new( :spec ) do |t|
			t.rspec_opts = "-cfd"
		end
	end

	if Rake::DevEiate::INT_SPEC_DIR.exist?
		task :test => :integration

		desc "Run integration tests"
		RSpec::Core::RakeTask.new( :integration ) do |t|
			t.rspec_opts = "-cfd"
			t.pattern = Rake::DevEiate::INT_SPEC_DIR + '**{,/*/**}/*_spec.rb'
		end
	end

	desc "Run specs with coverage reporting enabled"
	task :coverage do
		ENV['COVERAGE'] = 'yes'
		Rake::Task[:spec].invoke
	end


end