albacore 0.2.5 → 0.2.6
Sign up to get free protection for your applications and to get access to all the features.
- data/.autotest +4 -4
- data/.bundle/config +2 -2
- data/.rvmrc +1 -1
- data/Gemfile +12 -12
- data/README.markdown +92 -68
- data/VERSION +1 -1
- data/lib/albacore.rb +9 -9
- data/lib/albacore/albacoretask.rb +50 -50
- data/lib/albacore/aspnetcompiler.rb +58 -58
- data/lib/albacore/assemblyinfo.rb +140 -140
- data/lib/albacore/assemblyinfolanguages/cppcliengine.rb +17 -0
- data/lib/albacore/assemblyinfolanguages/csharpengine.rb +18 -18
- data/lib/albacore/assemblyinfolanguages/vbnetengine.rb +18 -18
- data/lib/albacore/config/aspnetcompilerconfig.rb +29 -29
- data/lib/albacore/config/assemblyinfoconfig.rb +13 -13
- data/lib/albacore/config/config.rb +22 -22
- data/lib/albacore/config/cscconfig.rb +28 -28
- data/lib/albacore/config/docuconfig.rb +23 -23
- data/lib/albacore/config/execconfig.rb +15 -15
- data/lib/albacore/config/fluentmigratorrunnerconfig.rb +15 -15
- data/lib/albacore/config/msbuildconfig.rb +29 -29
- data/lib/albacore/config/mspectestrunnerconfig.rb +15 -15
- data/lib/albacore/config/mstesttestrunnerconfig.rb +15 -15
- data/lib/albacore/config/nantconfig.rb +15 -15
- data/lib/albacore/config/nchurnconfig.rb +15 -15
- data/lib/albacore/config/ncoverconsoleconfig.rb +15 -15
- data/lib/albacore/config/ncoverreportconfig.rb +15 -15
- data/lib/albacore/config/ndependconfig.rb +15 -15
- data/lib/albacore/config/netversion.rb +21 -21
- data/lib/albacore/config/nugetpackconfig.rb +3 -3
- data/lib/albacore/config/nugetpublishconfig.rb +19 -0
- data/lib/albacore/config/nugetpushconfig.rb +19 -0
- data/lib/albacore/config/nunittestrunnerconfig.rb +14 -14
- data/lib/albacore/config/specflowreportconfig.rb +24 -24
- data/lib/albacore/config/sqlcmdconfig.rb +15 -15
- data/lib/albacore/config/unzipconfig.rb +15 -15
- data/lib/albacore/config/vssgetconfig.rb +14 -0
- data/lib/albacore/config/xbuildconfig.rb +15 -15
- data/lib/albacore/config/xunittestrunnerconfig.rb +15 -15
- data/lib/albacore/config/zipdirectoryconfig.rb +15 -15
- data/lib/albacore/csc.rb +66 -62
- data/lib/albacore/docu.rb +41 -41
- data/lib/albacore/exec.rb +18 -18
- data/lib/albacore/fluentmigratorrunner.rb +51 -46
- data/lib/albacore/msbuild.rb +55 -55
- data/lib/albacore/mspectestrunner.rb +50 -50
- data/lib/albacore/mstesttestrunner.rb +43 -43
- data/lib/albacore/nant.rb +38 -38
- data/lib/albacore/nchurn.rb +74 -74
- data/lib/albacore/ncoverconsole.rb +68 -68
- data/lib/albacore/ncoverreport.rb +62 -62
- data/lib/albacore/ncoverreports/assemblyfilter.rb +9 -9
- data/lib/albacore/ncoverreports/branchcoverage.rb +9 -9
- data/lib/albacore/ncoverreports/classfilter.rb +9 -9
- data/lib/albacore/ncoverreports/codecoveragebase.rb +25 -25
- data/lib/albacore/ncoverreports/cyclomaticcomplexity.rb +23 -23
- data/lib/albacore/ncoverreports/documentfilter.rb +9 -9
- data/lib/albacore/ncoverreports/fullcoveragereport.rb +13 -13
- data/lib/albacore/ncoverreports/methodcoverage.rb +9 -9
- data/lib/albacore/ncoverreports/methodfilter.rb +9 -9
- data/lib/albacore/ncoverreports/namespacefilter.rb +9 -9
- data/lib/albacore/ncoverreports/reportfilterbase.rb +26 -26
- data/lib/albacore/ncoverreports/summaryreport.rb +18 -18
- data/lib/albacore/ncoverreports/symbolcoverage.rb +9 -9
- data/lib/albacore/ndepend.rb +33 -33
- data/lib/albacore/nugetpublish.rb +47 -0
- data/lib/albacore/nugetpush.rb +46 -0
- data/lib/albacore/nunittestrunner.rb +41 -41
- data/lib/albacore/nuspec.rb +133 -109
- data/lib/albacore/output.rb +99 -99
- data/lib/albacore/plink.rb +47 -47
- data/lib/albacore/specflowreport.rb +62 -62
- data/lib/albacore/sqlcmd.rb +80 -80
- data/lib/albacore/support/attrmethods.rb +33 -33
- data/lib/albacore/support/createtask.rb +50 -30
- data/lib/albacore/support/failure.rb +15 -15
- data/lib/albacore/support/logging.rb +38 -38
- data/lib/albacore/support/openstruct.rb +13 -13
- data/lib/albacore/support/runcommand.rb +45 -45
- data/lib/albacore/support/supportlinux.rb +23 -23
- data/lib/albacore/support/updateattributes.rb +13 -13
- data/lib/albacore/support/yamlconfig.rb +18 -18
- data/lib/albacore/unzip.rb +28 -28
- data/lib/albacore/vssget.rb +44 -0
- data/lib/albacore/xbuild.rb +54 -54
- data/lib/albacore/xunittestrunner.rb +52 -52
- data/lib/albacore/zipdirectory.rb +105 -105
- data/rakefile.rb +297 -297
- data/spec/albacoremodel_spec.rb +53 -53
- data/spec/assemblyinfo_spec.rb +541 -541
- data/spec/attrmethods_spec.rb +136 -136
- data/spec/config_spec.rb +34 -34
- data/spec/createtask_spec.rb +236 -236
- data/spec/csc_spec.rb +253 -253
- data/spec/docu_spec.rb +109 -109
- data/spec/exec_spec.rb +45 -45
- data/spec/fluentmigratorrunner_spec.rb +254 -185
- data/spec/msbuild_spec.rb +215 -215
- data/spec/mspec_spec.rb +28 -28
- data/spec/mstesttestrunner_spec.rb +142 -142
- data/spec/nant_spec.rb +110 -110
- data/spec/nchurn_spec.rb +75 -75
- data/spec/ncoverconsole_spec.rb +353 -353
- data/spec/ncoverreport_spec.rb +619 -619
- data/spec/ndepend_spec.rb +72 -72
- data/spec/nunittestrunner_spec.rb +122 -122
- data/spec/nuspec_spec.rb +78 -78
- data/spec/patches/docu_patch.rb +12 -12
- data/spec/patches/fail_patch.rb +8 -8
- data/spec/patches/system_patch.rb +20 -20
- data/spec/plink_spec.rb +62 -62
- data/spec/runcommand_spec.rb +94 -94
- data/spec/spec_helper.rb +17 -17
- data/spec/specflowreport_spec.rb +146 -146
- data/spec/sqlcmd_spec.rb +334 -334
- data/spec/support/assemblyinfotester.rb +51 -51
- data/spec/support/ironruby_validator.rb +26 -26
- data/spec/support/msbuildtestdata.rb +32 -32
- data/spec/support/nanttestdata.rb +33 -33
- data/spec/support/ncoverconsoletestdata.rb +19 -19
- data/spec/support/ncoverreporttestdata.rb +26 -26
- data/spec/support/nokogiri_validator.rb +15 -15
- data/spec/support/outputtestdata.rb +12 -12
- data/spec/support/ziptestdata.rb +12 -12
- data/spec/unzip_spec.rb +15 -15
- data/spec/xbuild_spec.rb +15 -15
- data/spec/xunit_spec.rb +168 -168
- data/spec/yamlconfig_spec.rb +49 -49
- data/spec/zip_spec.rb +104 -104
- data/watchrtesting.rb +8 -8
- metadata +15 -119
data/spec/msbuild_spec.rb
CHANGED
@@ -1,215 +1,215 @@
|
|
1
|
-
require 'spec_helper'
|
2
|
-
require 'albacore/msbuild'
|
3
|
-
require 'albacore/config/msbuildconfig'
|
4
|
-
require 'msbuildtestdata'
|
5
|
-
|
6
|
-
shared_examples_for "prepping msbuild" do
|
7
|
-
before :all do
|
8
|
-
@testdata = MSBuildTestData.new
|
9
|
-
@msbuild = @testdata.msbuild
|
10
|
-
@strio = StringIO.new
|
11
|
-
@msbuild.log_device = @strio
|
12
|
-
@msbuild.log_level = :diagnostic
|
13
|
-
end
|
14
|
-
end
|
15
|
-
|
16
|
-
describe MSBuild, "when building a solution with verbose logging turned on" do
|
17
|
-
it_should_behave_like "prepping msbuild"
|
18
|
-
|
19
|
-
before :all do
|
20
|
-
@msbuild.solution = @testdata.solution_path
|
21
|
-
@msbuild.execute
|
22
|
-
|
23
|
-
@log_data = @strio.string
|
24
|
-
end
|
25
|
-
|
26
|
-
it "should log the msbuild command line being called" do
|
27
|
-
@log_data.should include("Executing MSBuild: \"C:/Windows/Microsoft.NET/Framework/v4.0.30319/MSBuild.exe\"")
|
28
|
-
end
|
29
|
-
end
|
30
|
-
|
31
|
-
describe MSBuild, "when building with no solution specified" do
|
32
|
-
it_should_behave_like "prepping msbuild"
|
33
|
-
|
34
|
-
before :all do
|
35
|
-
@msbuild.extend(FailPatch)
|
36
|
-
@msbuild.execute
|
37
|
-
@log_data = @strio.string
|
38
|
-
end
|
39
|
-
|
40
|
-
it "should log an error message saying the output file is required" do
|
41
|
-
@log_data.should include("solution cannot be nil")
|
42
|
-
end
|
43
|
-
end
|
44
|
-
|
45
|
-
describe MSBuild, "when an msbuild path is not specified" do
|
46
|
-
before :all do
|
47
|
-
@testdata = MSBuildTestData.new
|
48
|
-
@msbuild = @testdata.msbuild
|
49
|
-
end
|
50
|
-
|
51
|
-
it "should default to the .net framework v4" do
|
52
|
-
@msbuild.command.should == @testdata.msbuild_path
|
53
|
-
end
|
54
|
-
end
|
55
|
-
|
56
|
-
describe MSBuild, "when an msbuild path is specified" do
|
57
|
-
before :all do
|
58
|
-
@testdata = MSBuildTestData.new
|
59
|
-
@msbuild = @testdata.msbuild "Some Path"
|
60
|
-
end
|
61
|
-
|
62
|
-
it "should use the specified path for the msbuild exe" do
|
63
|
-
@msbuild.command.should == "Some Path"
|
64
|
-
end
|
65
|
-
end
|
66
|
-
|
67
|
-
describe MSBuild, "when msbuild is configured to use a specific .net version" do
|
68
|
-
before :all do
|
69
|
-
Albacore.configure do |config|
|
70
|
-
config.msbuild.use :net35
|
71
|
-
end
|
72
|
-
@testdata = MSBuildTestData.new
|
73
|
-
@msbuild = @testdata.msbuild
|
74
|
-
end
|
75
|
-
|
76
|
-
it "should use the configured version" do
|
77
|
-
win_dir = ENV['windir'] || ENV['WINDIR'] || "C:/Windows"
|
78
|
-
@msbuild.command.should == File.join(win_dir.dup, 'Microsoft.NET', 'Framework', 'v3.5', 'MSBuild.exe')
|
79
|
-
end
|
80
|
-
end
|
81
|
-
|
82
|
-
describe MSBuild, "when msbuild is configured to use a specific .net version, and overriding for a specific instance" do
|
83
|
-
before :all do
|
84
|
-
Albacore.configure do |config|
|
85
|
-
config.msbuild.use :net35
|
86
|
-
end
|
87
|
-
@testdata = MSBuildTestData.new
|
88
|
-
@msbuild = @testdata.msbuild
|
89
|
-
@msbuild.use :net40
|
90
|
-
end
|
91
|
-
|
92
|
-
it "should use the override version" do
|
93
|
-
win_dir = ENV['windir'] || ENV['WINDIR'] || "C:/Windows"
|
94
|
-
@msbuild.command.should == File.join(win_dir.dup, 'Microsoft.NET', 'Framework', 'v4.0.30319', 'MSBuild.exe')
|
95
|
-
end
|
96
|
-
end
|
97
|
-
|
98
|
-
describe MSBuild, "when building a visual studio solution" do
|
99
|
-
it_should_behave_like "prepping msbuild"
|
100
|
-
|
101
|
-
before :all do
|
102
|
-
@msbuild.solution = @testdata.solution_path
|
103
|
-
@msbuild.execute
|
104
|
-
end
|
105
|
-
|
106
|
-
it "should output the solution's binaries" do
|
107
|
-
File.exist?(@testdata.output_path).should == true
|
108
|
-
end
|
109
|
-
end
|
110
|
-
|
111
|
-
describe MSBuild, "when building a visual studio solution with a single target" do
|
112
|
-
it_should_behave_like "prepping msbuild"
|
113
|
-
|
114
|
-
before :all do
|
115
|
-
@msbuild.solution = @testdata.solution_path
|
116
|
-
@msbuild.targets :Rebuild
|
117
|
-
@msbuild.execute
|
118
|
-
end
|
119
|
-
|
120
|
-
it "should output the solution's binaries" do
|
121
|
-
File.exist?(@testdata.output_path).should == true
|
122
|
-
end
|
123
|
-
end
|
124
|
-
|
125
|
-
describe MSBuild, "when building a visual studio solution for a specified configuration" do
|
126
|
-
before :all do
|
127
|
-
@testdata= MSBuildTestData.new("Release")
|
128
|
-
@msbuild = @testdata.msbuild
|
129
|
-
|
130
|
-
@msbuild.properties :configuration => :Release
|
131
|
-
@msbuild.solution = @testdata.solution_path
|
132
|
-
@msbuild.execute
|
133
|
-
end
|
134
|
-
|
135
|
-
it "should build with the specified configuration as a property" do
|
136
|
-
@msbuild.system_command.should include("/p:configuration=\"Release\"")
|
137
|
-
end
|
138
|
-
|
139
|
-
it "should output the solution's binaries according to the specified configuration" do
|
140
|
-
File.exist?(@testdata.output_path).should be_true
|
141
|
-
end
|
142
|
-
end
|
143
|
-
|
144
|
-
describe MSBuild, "when specifying targets to build" do
|
145
|
-
it_should_behave_like "prepping msbuild"
|
146
|
-
|
147
|
-
before :all do
|
148
|
-
@msbuild.targets :Clean, :Build
|
149
|
-
@msbuild.solution = @testdata.solution_path
|
150
|
-
@msbuild.execute
|
151
|
-
end
|
152
|
-
|
153
|
-
it "should build the targets" do
|
154
|
-
@msbuild.system_command.should include("/target:Clean;Build")
|
155
|
-
end
|
156
|
-
|
157
|
-
end
|
158
|
-
|
159
|
-
describe MSBuild, "when building a solution with a specific msbuild verbosity" do
|
160
|
-
it_should_behave_like "prepping msbuild"
|
161
|
-
|
162
|
-
before :all do
|
163
|
-
@msbuild.verbosity = "normal"
|
164
|
-
@msbuild.solution = @testdata.solution_path
|
165
|
-
@msbuild.execute
|
166
|
-
end
|
167
|
-
|
168
|
-
it "should call msbuild with the specified verbosity" do
|
169
|
-
@msbuild.system_command.should include("/verbosity:normal")
|
170
|
-
end
|
171
|
-
end
|
172
|
-
|
173
|
-
describe MSBuild, "when specifying multiple configuration properties" do
|
174
|
-
it_should_behave_like "prepping msbuild"
|
175
|
-
|
176
|
-
before :all do
|
177
|
-
File.delete(@testdata.output_path) if File.exist?(@testdata.output_path)
|
178
|
-
|
179
|
-
@msbuild.targets :Clean, :Build
|
180
|
-
@msbuild.properties :configuration => :Debug, :DebugSymbols => true
|
181
|
-
@msbuild.solution = @testdata.solution_path
|
182
|
-
@msbuild.execute
|
183
|
-
end
|
184
|
-
|
185
|
-
it "should specify the first property" do
|
186
|
-
@msbuild.system_command.should include("/p:configuration=\"Debug\"")
|
187
|
-
end
|
188
|
-
|
189
|
-
it "should specifiy the second property" do
|
190
|
-
@msbuild.system_command.should include("/p:DebugSymbols=\"true\"")
|
191
|
-
end
|
192
|
-
|
193
|
-
it "should output the solution's binaries" do
|
194
|
-
File.exist?(@testdata.output_path).should == true
|
195
|
-
end
|
196
|
-
end
|
197
|
-
|
198
|
-
describe MSBuild, "when specifying a loggermodule" do
|
199
|
-
it_should_behave_like "prepping msbuild"
|
200
|
-
|
201
|
-
before :all do
|
202
|
-
@msbuild.solution = @testdata.solution_path
|
203
|
-
@msbuild.loggermodule = "FileLogger,Microsoft.Build.Engine;logfile=MyLog.log"
|
204
|
-
@msbuild.execute
|
205
|
-
|
206
|
-
@log_data = @strio.string
|
207
|
-
end
|
208
|
-
|
209
|
-
it "should log the msbuild logger being used" do
|
210
|
-
puts @msbuild.system_command
|
211
|
-
@msbuild.system_command.should include("/logger:FileLogger,Microsoft.Build.Engine;logfile=MyLog.log")
|
212
|
-
end
|
213
|
-
end
|
214
|
-
|
215
|
-
|
1
|
+
require 'spec_helper'
|
2
|
+
require 'albacore/msbuild'
|
3
|
+
require 'albacore/config/msbuildconfig'
|
4
|
+
require 'msbuildtestdata'
|
5
|
+
|
6
|
+
shared_examples_for "prepping msbuild" do
|
7
|
+
before :all do
|
8
|
+
@testdata = MSBuildTestData.new
|
9
|
+
@msbuild = @testdata.msbuild
|
10
|
+
@strio = StringIO.new
|
11
|
+
@msbuild.log_device = @strio
|
12
|
+
@msbuild.log_level = :diagnostic
|
13
|
+
end
|
14
|
+
end
|
15
|
+
|
16
|
+
describe MSBuild, "when building a solution with verbose logging turned on" do
|
17
|
+
it_should_behave_like "prepping msbuild"
|
18
|
+
|
19
|
+
before :all do
|
20
|
+
@msbuild.solution = @testdata.solution_path
|
21
|
+
@msbuild.execute
|
22
|
+
|
23
|
+
@log_data = @strio.string
|
24
|
+
end
|
25
|
+
|
26
|
+
it "should log the msbuild command line being called" do
|
27
|
+
@log_data.should include("Executing MSBuild: \"C:/Windows/Microsoft.NET/Framework/v4.0.30319/MSBuild.exe\"")
|
28
|
+
end
|
29
|
+
end
|
30
|
+
|
31
|
+
describe MSBuild, "when building with no solution specified" do
|
32
|
+
it_should_behave_like "prepping msbuild"
|
33
|
+
|
34
|
+
before :all do
|
35
|
+
@msbuild.extend(FailPatch)
|
36
|
+
@msbuild.execute
|
37
|
+
@log_data = @strio.string
|
38
|
+
end
|
39
|
+
|
40
|
+
it "should log an error message saying the output file is required" do
|
41
|
+
@log_data.should include("solution cannot be nil")
|
42
|
+
end
|
43
|
+
end
|
44
|
+
|
45
|
+
describe MSBuild, "when an msbuild path is not specified" do
|
46
|
+
before :all do
|
47
|
+
@testdata = MSBuildTestData.new
|
48
|
+
@msbuild = @testdata.msbuild
|
49
|
+
end
|
50
|
+
|
51
|
+
it "should default to the .net framework v4" do
|
52
|
+
@msbuild.command.should == @testdata.msbuild_path
|
53
|
+
end
|
54
|
+
end
|
55
|
+
|
56
|
+
describe MSBuild, "when an msbuild path is specified" do
|
57
|
+
before :all do
|
58
|
+
@testdata = MSBuildTestData.new
|
59
|
+
@msbuild = @testdata.msbuild "Some Path"
|
60
|
+
end
|
61
|
+
|
62
|
+
it "should use the specified path for the msbuild exe" do
|
63
|
+
@msbuild.command.should == "Some Path"
|
64
|
+
end
|
65
|
+
end
|
66
|
+
|
67
|
+
describe MSBuild, "when msbuild is configured to use a specific .net version" do
|
68
|
+
before :all do
|
69
|
+
Albacore.configure do |config|
|
70
|
+
config.msbuild.use :net35
|
71
|
+
end
|
72
|
+
@testdata = MSBuildTestData.new
|
73
|
+
@msbuild = @testdata.msbuild
|
74
|
+
end
|
75
|
+
|
76
|
+
it "should use the configured version" do
|
77
|
+
win_dir = ENV['windir'] || ENV['WINDIR'] || "C:/Windows"
|
78
|
+
@msbuild.command.should == File.join(win_dir.dup, 'Microsoft.NET', 'Framework', 'v3.5', 'MSBuild.exe')
|
79
|
+
end
|
80
|
+
end
|
81
|
+
|
82
|
+
describe MSBuild, "when msbuild is configured to use a specific .net version, and overriding for a specific instance" do
|
83
|
+
before :all do
|
84
|
+
Albacore.configure do |config|
|
85
|
+
config.msbuild.use :net35
|
86
|
+
end
|
87
|
+
@testdata = MSBuildTestData.new
|
88
|
+
@msbuild = @testdata.msbuild
|
89
|
+
@msbuild.use :net40
|
90
|
+
end
|
91
|
+
|
92
|
+
it "should use the override version" do
|
93
|
+
win_dir = ENV['windir'] || ENV['WINDIR'] || "C:/Windows"
|
94
|
+
@msbuild.command.should == File.join(win_dir.dup, 'Microsoft.NET', 'Framework', 'v4.0.30319', 'MSBuild.exe')
|
95
|
+
end
|
96
|
+
end
|
97
|
+
|
98
|
+
describe MSBuild, "when building a visual studio solution" do
|
99
|
+
it_should_behave_like "prepping msbuild"
|
100
|
+
|
101
|
+
before :all do
|
102
|
+
@msbuild.solution = @testdata.solution_path
|
103
|
+
@msbuild.execute
|
104
|
+
end
|
105
|
+
|
106
|
+
it "should output the solution's binaries" do
|
107
|
+
File.exist?(@testdata.output_path).should == true
|
108
|
+
end
|
109
|
+
end
|
110
|
+
|
111
|
+
describe MSBuild, "when building a visual studio solution with a single target" do
|
112
|
+
it_should_behave_like "prepping msbuild"
|
113
|
+
|
114
|
+
before :all do
|
115
|
+
@msbuild.solution = @testdata.solution_path
|
116
|
+
@msbuild.targets :Rebuild
|
117
|
+
@msbuild.execute
|
118
|
+
end
|
119
|
+
|
120
|
+
it "should output the solution's binaries" do
|
121
|
+
File.exist?(@testdata.output_path).should == true
|
122
|
+
end
|
123
|
+
end
|
124
|
+
|
125
|
+
describe MSBuild, "when building a visual studio solution for a specified configuration" do
|
126
|
+
before :all do
|
127
|
+
@testdata= MSBuildTestData.new("Release")
|
128
|
+
@msbuild = @testdata.msbuild
|
129
|
+
|
130
|
+
@msbuild.properties :configuration => :Release
|
131
|
+
@msbuild.solution = @testdata.solution_path
|
132
|
+
@msbuild.execute
|
133
|
+
end
|
134
|
+
|
135
|
+
it "should build with the specified configuration as a property" do
|
136
|
+
@msbuild.system_command.should include("/p:configuration=\"Release\"")
|
137
|
+
end
|
138
|
+
|
139
|
+
it "should output the solution's binaries according to the specified configuration" do
|
140
|
+
File.exist?(@testdata.output_path).should be_true
|
141
|
+
end
|
142
|
+
end
|
143
|
+
|
144
|
+
describe MSBuild, "when specifying targets to build" do
|
145
|
+
it_should_behave_like "prepping msbuild"
|
146
|
+
|
147
|
+
before :all do
|
148
|
+
@msbuild.targets :Clean, :Build
|
149
|
+
@msbuild.solution = @testdata.solution_path
|
150
|
+
@msbuild.execute
|
151
|
+
end
|
152
|
+
|
153
|
+
it "should build the targets" do
|
154
|
+
@msbuild.system_command.should include("/target:Clean;Build")
|
155
|
+
end
|
156
|
+
|
157
|
+
end
|
158
|
+
|
159
|
+
describe MSBuild, "when building a solution with a specific msbuild verbosity" do
|
160
|
+
it_should_behave_like "prepping msbuild"
|
161
|
+
|
162
|
+
before :all do
|
163
|
+
@msbuild.verbosity = "normal"
|
164
|
+
@msbuild.solution = @testdata.solution_path
|
165
|
+
@msbuild.execute
|
166
|
+
end
|
167
|
+
|
168
|
+
it "should call msbuild with the specified verbosity" do
|
169
|
+
@msbuild.system_command.should include("/verbosity:normal")
|
170
|
+
end
|
171
|
+
end
|
172
|
+
|
173
|
+
describe MSBuild, "when specifying multiple configuration properties" do
|
174
|
+
it_should_behave_like "prepping msbuild"
|
175
|
+
|
176
|
+
before :all do
|
177
|
+
File.delete(@testdata.output_path) if File.exist?(@testdata.output_path)
|
178
|
+
|
179
|
+
@msbuild.targets :Clean, :Build
|
180
|
+
@msbuild.properties :configuration => :Debug, :DebugSymbols => true
|
181
|
+
@msbuild.solution = @testdata.solution_path
|
182
|
+
@msbuild.execute
|
183
|
+
end
|
184
|
+
|
185
|
+
it "should specify the first property" do
|
186
|
+
@msbuild.system_command.should include("/p:configuration=\"Debug\"")
|
187
|
+
end
|
188
|
+
|
189
|
+
it "should specifiy the second property" do
|
190
|
+
@msbuild.system_command.should include("/p:DebugSymbols=\"true\"")
|
191
|
+
end
|
192
|
+
|
193
|
+
it "should output the solution's binaries" do
|
194
|
+
File.exist?(@testdata.output_path).should == true
|
195
|
+
end
|
196
|
+
end
|
197
|
+
|
198
|
+
describe MSBuild, "when specifying a loggermodule" do
|
199
|
+
it_should_behave_like "prepping msbuild"
|
200
|
+
|
201
|
+
before :all do
|
202
|
+
@msbuild.solution = @testdata.solution_path
|
203
|
+
@msbuild.loggermodule = "FileLogger,Microsoft.Build.Engine;logfile=MyLog.log"
|
204
|
+
@msbuild.execute
|
205
|
+
|
206
|
+
@log_data = @strio.string
|
207
|
+
end
|
208
|
+
|
209
|
+
it "should log the msbuild logger being used" do
|
210
|
+
puts @msbuild.system_command
|
211
|
+
@msbuild.system_command.should include("/logger:FileLogger,Microsoft.Build.Engine;logfile=MyLog.log")
|
212
|
+
end
|
213
|
+
end
|
214
|
+
|
215
|
+
|
data/spec/mspec_spec.rb
CHANGED
@@ -1,28 +1,28 @@
|
|
1
|
-
require 'spec_helper'
|
2
|
-
require 'albacore/mspectestrunner'
|
3
|
-
|
4
|
-
describe MSpecTestRunner, "when providing configuration" do
|
5
|
-
let :mspec do
|
6
|
-
Albacore.configure do |config|
|
7
|
-
config.mspec.command = "test"
|
8
|
-
end
|
9
|
-
mspec = MSpecTestRunner.new
|
10
|
-
end
|
11
|
-
|
12
|
-
it "should use the configured values" do
|
13
|
-
mspec.command.should == "test"
|
14
|
-
end
|
15
|
-
end
|
16
|
-
|
17
|
-
describe MSpecTestRunner, "when overriding the command through the initializer" do
|
18
|
-
let :mspec do
|
19
|
-
Albacore.configure do |config|
|
20
|
-
config.mspec.command = "configured"
|
21
|
-
end
|
22
|
-
mspec = MSpecTestRunner.new("override")
|
23
|
-
end
|
24
|
-
|
25
|
-
it "should use the command override" do
|
26
|
-
mspec.command.should == "override"
|
27
|
-
end
|
28
|
-
end
|
1
|
+
require 'spec_helper'
|
2
|
+
require 'albacore/mspectestrunner'
|
3
|
+
|
4
|
+
describe MSpecTestRunner, "when providing configuration" do
|
5
|
+
let :mspec do
|
6
|
+
Albacore.configure do |config|
|
7
|
+
config.mspec.command = "test"
|
8
|
+
end
|
9
|
+
mspec = MSpecTestRunner.new
|
10
|
+
end
|
11
|
+
|
12
|
+
it "should use the configured values" do
|
13
|
+
mspec.command.should == "test"
|
14
|
+
end
|
15
|
+
end
|
16
|
+
|
17
|
+
describe MSpecTestRunner, "when overriding the command through the initializer" do
|
18
|
+
let :mspec do
|
19
|
+
Albacore.configure do |config|
|
20
|
+
config.mspec.command = "configured"
|
21
|
+
end
|
22
|
+
mspec = MSpecTestRunner.new("override")
|
23
|
+
end
|
24
|
+
|
25
|
+
it "should use the command override" do
|
26
|
+
mspec.command.should == "override"
|
27
|
+
end
|
28
|
+
end
|