forked from richardlawrence/Cuke4Nuke
-
Notifications
You must be signed in to change notification settings - Fork 1
/
Rakefile
38 lines (31 loc) · 930 Bytes
/
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
task :default => :build
Dir['lib/task/*.rake'].each do |rake|
import rake
end
desc "Build the C# code with MSBuild"
task :build do
msbuild = 'c:\windows\microsoft.net\framework\v3.5\msbuild.exe'
solution = File.expand_path(File.dirname(__FILE__) + '/Cuke4Nuke/Cuke4Nuke.sln')
sh %{#{msbuild} "#{solution}" /p:configuration=Debug}
end
desc "Run the unit tests with NUnit"
task :test do
nunit = 'C:\Program Files\NUnit 2.5.2\bin\net-2.0\nunit-console.exe'
tests = File.expand_path(File.dirname(__FILE__) + '/Cuke4Nuke/Specifications/bin/Debug/Cuke4Nuke.Specifications.dll')
sh %{"#{nunit}" "#{tests}"}
end
task :log => 'log:less'
namespace :log do
desc "Clear log"
task :clear do
`rm -rf #{log}`
end
desc "View log in less"
task :less do
exec %{less #{log}}
end
end
def log
file = File.expand_path(File.dirname(__FILE__) + '/Cuke4Nuke/Server/bin/Debug/Cuke4NukeLog.txt')
%{"#{file}"}
end