forked from FubuMvcArchive/fubuvalidation
-
Notifications
You must be signed in to change notification settings - Fork 0
/
rakefile.rb
83 lines (69 loc) · 2.43 KB
/
rakefile.rb
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
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
begin
require 'bundler/setup'
require 'fuburake'
rescue LoadError
puts 'Bundler and all the gems need to be installed prior to running this rake script. Installing...'
system("gem install bundler --source http://rubygems.org")
sh 'bundle install'
system("bundle exec rake", *ARGV)
exit 0
end
@solution = FubuRake::Solution.new do |sln|
sln.compile = {
:solutionfile => 'src/FubuValidation.sln'
}
sln.assembly_info = {
:product_name => "FubuValidaton",
:copyright => 'Copyright 2008-2013 Jeremy D. Miller, Josh Arnold, et al. All rights reserved.'
}
sln.ripple_enabled = true
sln.fubudocs_enabled = true
sln.assembly_bottle 'FubuMVC.Validation'
sln.ci_steps = ['run_phantom', 'st:run']
sln.defaults = [:run]
end
desc "Target used for the CI on mono"
task :mono_ci => [:compile, :mono_unit_test]
desc "Runs some of the unit tests for Mono"
task :mono_unit_test => :compile do
runner = NUnitRunner.new :compilemode => @solution.compilemode, :source => 'src', :platform => 'x86'
runner.executeTests ['FubuValidation.Tests', 'FubuValidation.StructureMap.Tests', 'FubuMVC.Validation.Tests']
end
desc "Opens the Serenity Jasmine Runner in interactive mode"
task :open do
serenity "jasmine interactive src/serenity.txt -b Firefox"
end
desc "Runs the Jasmine tests"
task :run => [:compile] do
serenity "jasmine run --timeout 60 src/serenity.txt -b Phantom"
end
desc "Runs the Jasmine tests and outputs the results for TC"
task :run_phantom => [:compile] do
serenity "jasmine run --verbose --timeout 60 src/serenity.txt -b Phantom"
end
FubuRake::Storyteller.new({
:path => 'src/FubuMVC.Validation.StoryTeller',
:profile => 'Firefox',
:compilemode => @solution.compilemode
})
FubuRake::Storyteller.new({
:path => 'src/FubuMVC.Validation.StoryTeller',
:prefix => 'st:phantom',
:profile => 'Phantom',
:compilemode => @solution.compilemode
})
FubuRake::Storyteller.new({
:path => 'src/FubuMVC.Validation.StoryTeller',
:prefix => 'st:chrome',
:profile => 'Chrome',
:compilemode => @solution.compilemode
})
desc "Smoke test"
task :smoke => [:default] do
sh "rm -rf src/FubuMVC.Validation.StoryTeller/fubu-content"
serenity "storyteller src/FubuMVC.Validation.StoryTeller/validation.xml -b Phantom"
end
def self.serenity(args)
serenity = Platform.runtime(Nuget.tool("Serenity", "SerenityRunner.exe"), "v4.0.30319")
sh "#{serenity} #{args}"
end