main
1require 'build_utilities.rb'
2require 'local_properties.rb'
3require 'project_name.rb'
4require 'rake/clean'
5require 'fileutils'
6
7#load settings that differ by machine
8local_settings = LocalSettings.new
9
10COMPILE_TARGET = 'debug'
11
12CLEAN.include('artifacts','**/bin','**/obj')
13
14#target folders that can be run from VS
15project_test_dir = File.join('product',"#{Project.name}.tests",'bin','debug')
16
17output_folders = [project_test_dir]
18
19task :default => [:full_test]
20
21task :init => :clean do
22 mkdir 'artifacts'
23 mkdir 'artifacts/coverage'
24 mkdir 'artifacts/deploy'
25end
26
27desc 'compiles the project'
28task :compile => :init do
29 MSBuildRunner.compile :compile_target => COMPILE_TARGET, :solution_file => '../solution.sln'
30end
31
32task :deploy => :compile do
33 Dir.glob(File.join('product','**','mo.money*.dll')).each do|file|
34 FileUtils.cp file,File.join('artifacts','deploy')
35 end
36end
37
38desc 'run the tests for the project'
39task :test, :category_to_exclude, :needs => [:compile] do |t,args|
40 args.with_defaults(:category_to_exclude => 'SLOW')
41 runner = MbUnitRunner.new :compile_target => COMPILE_TARGET, :category_to_exclude => args.category_to_exclude
42 runner.execute_tests ["Gorilla.Commons.Infrastructure"]
43end
44
45desc 'run the bdddoc test report for the project'
46task :run_test_report => [:test] do
47 runner = BDDDocRunner.new
48 runner.run(File.join('product','developwithpassion.bdd.tests','bin','debug','developwithpassion.bdd.tests.dll'))
49end
50