/
rakefile
executable file
·59 lines (47 loc) · 1.85 KB
/
rakefile
1
2
3
4
5
6
7
8
9
10
11
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
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
require 'rake'
require 'spec/rake/spectask'
require 'cucumber'
require 'cucumber/rake/task'
require 'albacore'
desc 'Builds the Monopoly app'
task :default => [:msbuild]
desc 'Builds Monopoly app and runs the nunit tests'
task :test => [:msbuild, :nunit]
desc 'Builds Monopoly app and runs the rspec tests'
task :spec => [:msbuild, :rspec]
desc 'Builds Monopoly app and runs rspec tests in specdoc format'
task :specdoc => [:msbuild, :formatspec]
desc 'Builds Monopoly app and runs cucumber features in progress mode'
task :cuke => [:msbuild, :features_progress]
desc 'Builds Monopoly app, runs nunit tests, runs rspec tests, and runs cucumber features'
task :all => [:msbuild, :nunit, :rspec, :features_progress]
desc "Build Monopoly in .Net 4.0 using the MSBuildTask"
msbuild do |msb|
msb.path_to_command = File.join(ENV['windir'], 'Microsoft.NET', 'Framework', 'v4.0.30319', 'MSBuild.exe')
msb.properties :configuration => :Debug
msb.targets :Clean, :Build
msb.verbosity = 'quiet'
msb.solution = "src/Monopoly.sln"
end
desc "NUnit Test Runner for Monopoly"
nunit do |nunit|
nunit.path_to_command = "libs/nUnit/nunit-console.exe"
nunit.assemblies "src/Monopoly.Tests.NUnit/bin/Debug/Monopoly.Tests.NUnit.dll"
end
desc 'Runs the rspec tests in IronRuby'
Spec::Rake::SpecTask.new(:rspec) do |t|
t.spec_files = Dir.glob('src/Monopoly.Specs.RSpec/**/*_spec.rb')
end
desc 'Runs the rspec tests in IronRuby and outputs specdoc'
Spec::Rake::SpecTask.new(:formatspec) do |t|
t.spec_files = Dir.glob('src/Monopoly.Specs.RSpec/**/*_spec.rb')
t.spec_opts << '--format specdoc'
end
desc 'Runs the cucumber features'
Cucumber::Rake::Task.new(:features) do |t|
t.cucumber_opts = "features --format pretty --no-source"
end
desc 'Runs the cucumber features with a . per test'
Cucumber::Rake::Task.new(:features_progress) do |t|
t.cucumber_opts = "features --format progress"
end