albacore 0.2.6 → 0.2.7
Sign up to get free protection for your applications and to get access to all the features.
- data/Gemfile +7 -7
- data/README.markdown +0 -33
- data/VERSION +1 -1
- metadata +84 -91
- data/spec/albacoremodel_spec.rb +0 -53
- data/spec/assemblyinfo_spec.rb +0 -541
- data/spec/attrmethods_spec.rb +0 -136
- data/spec/config_spec.rb +0 -34
- data/spec/createtask_spec.rb +0 -236
- data/spec/csc_spec.rb +0 -253
- data/spec/docu_spec.rb +0 -109
- data/spec/exec_spec.rb +0 -45
- data/spec/fluentmigratorrunner_spec.rb +0 -254
- data/spec/msbuild_spec.rb +0 -215
- data/spec/mspec_spec.rb +0 -28
- data/spec/mstesttestrunner_spec.rb +0 -142
- data/spec/nant_spec.rb +0 -110
- data/spec/nchurn_spec.rb +0 -75
- data/spec/ncoverconsole_spec.rb +0 -353
- data/spec/ncoverreport_spec.rb +0 -619
- data/spec/ndepend_spec.rb +0 -72
- data/spec/nunittestrunner_spec.rb +0 -122
- data/spec/nuspec_spec.rb +0 -78
- data/spec/output_spec.rb +0 -117
- data/spec/patches/docu_patch.rb +0 -13
- data/spec/patches/fail_patch.rb +0 -9
- data/spec/patches/system_patch.rb +0 -20
- data/spec/plink_spec.rb +0 -62
- data/spec/runcommand_spec.rb +0 -94
- data/spec/spec_helper.rb +0 -17
- data/spec/specflowreport_spec.rb +0 -146
- data/spec/sqlcmd_spec.rb +0 -334
- data/spec/support/assemblyinfotester.rb +0 -51
- data/spec/support/ironruby_validator.rb +0 -26
- data/spec/support/msbuildtestdata.rb +0 -32
- data/spec/support/nanttestdata.rb +0 -33
- data/spec/support/ncoverconsoletestdata.rb +0 -20
- data/spec/support/ncoverreporttestdata.rb +0 -26
- data/spec/support/nokogiri_validator.rb +0 -15
- data/spec/support/outputtestdata.rb +0 -13
- data/spec/support/ziptestdata.rb +0 -13
- data/spec/unzip_spec.rb +0 -15
- data/spec/xbuild_spec.rb +0 -15
- data/spec/xunit_spec.rb +0 -168
- data/spec/yamlconfig_spec.rb +0 -49
- data/spec/zip_spec.rb +0 -104
data/spec/docu_spec.rb
DELETED
@@ -1,109 +0,0 @@
|
|
1
|
-
require 'spec_helper'
|
2
|
-
require 'albacore/docu'
|
3
|
-
require 'docu_patch'
|
4
|
-
|
5
|
-
describe Docu, "when building docs without any assemblies specified" do
|
6
|
-
before :all do
|
7
|
-
@docu = Docu.new
|
8
|
-
@docu.execute
|
9
|
-
end
|
10
|
-
|
11
|
-
it "should fail with a missing assemblies message" do
|
12
|
-
@docu.failed.should be_true
|
13
|
-
@docu.failure_message.should eql('Docu Failed. No assemblies specified')
|
14
|
-
end
|
15
|
-
end
|
16
|
-
|
17
|
-
describe Docu, "when building docs fails" do
|
18
|
-
before :all do
|
19
|
-
@docu = Docu.new
|
20
|
-
@docu.command_result = false
|
21
|
-
@docu.assemblies 'test.dll'
|
22
|
-
@docu.execute
|
23
|
-
end
|
24
|
-
|
25
|
-
it "should fail with a generic message" do
|
26
|
-
@docu.failed.should be_true
|
27
|
-
@docu.failure_message.should eql('Docu Failed. See Build Log For Detail')
|
28
|
-
end
|
29
|
-
end
|
30
|
-
|
31
|
-
describe Docu, "when building docs with assemblies specified" do
|
32
|
-
before :all do
|
33
|
-
@docu = Docu.new
|
34
|
-
@docu.command_result = true
|
35
|
-
@docu.assemblies 'test.dll'
|
36
|
-
@docu.execute
|
37
|
-
end
|
38
|
-
|
39
|
-
it "should pass the assemblies in the command-line arguments" do
|
40
|
-
@docu.command_parameters.should include('test.dll')
|
41
|
-
end
|
42
|
-
end
|
43
|
-
|
44
|
-
describe Docu, "when building docs with assemblies and xml files specified" do
|
45
|
-
before :all do
|
46
|
-
@docu = Docu.new
|
47
|
-
@docu.command_result = true
|
48
|
-
@docu.xml_files 'test.xml'
|
49
|
-
@docu.assemblies 'test.dll'
|
50
|
-
@docu.execute
|
51
|
-
end
|
52
|
-
|
53
|
-
it "should pass the xml files in the command-line arguments after the assemblies" do
|
54
|
-
@docu.command_parameters.should include('test.dll test.xml')
|
55
|
-
end
|
56
|
-
end
|
57
|
-
|
58
|
-
describe Docu, "when building docs with an output location specified" do
|
59
|
-
before :all do
|
60
|
-
@docu = Docu.new
|
61
|
-
@docu.command_result = true
|
62
|
-
@docu.assemblies 'test.dll'
|
63
|
-
@docu.output_location = 'output_location'
|
64
|
-
@docu.execute
|
65
|
-
end
|
66
|
-
|
67
|
-
it "should pass the output location using the --output switch" do
|
68
|
-
@docu.command_parameters.should include('--output="output_location"')
|
69
|
-
end
|
70
|
-
end
|
71
|
-
|
72
|
-
describe Docu, "when no command has been specified" do
|
73
|
-
let :docu do
|
74
|
-
docu = Docu.new
|
75
|
-
docu
|
76
|
-
end
|
77
|
-
|
78
|
-
it "should default to the standard docu.exe" do
|
79
|
-
docu.command.should == "Docu.exe"
|
80
|
-
end
|
81
|
-
end
|
82
|
-
|
83
|
-
describe Docu, "when the command has been provided through configuration" do
|
84
|
-
let :docu do
|
85
|
-
Albacore.configure do |config|
|
86
|
-
config.docu.command = "configured"
|
87
|
-
end
|
88
|
-
docu = Docu.new
|
89
|
-
docu
|
90
|
-
end
|
91
|
-
|
92
|
-
it "should use the configured command" do
|
93
|
-
docu.command.should == "configured"
|
94
|
-
end
|
95
|
-
end
|
96
|
-
|
97
|
-
describe Docu, "when the command has been provided through configuration and is overriden through the initializer" do
|
98
|
-
let :docu do
|
99
|
-
Albacore.configure do |config|
|
100
|
-
config.docu.command = "configured"
|
101
|
-
end
|
102
|
-
docu = Docu.new("override")
|
103
|
-
docu
|
104
|
-
end
|
105
|
-
|
106
|
-
it "should use the override" do
|
107
|
-
docu.command.should == "override"
|
108
|
-
end
|
109
|
-
end
|
data/spec/exec_spec.rb
DELETED
@@ -1,45 +0,0 @@
|
|
1
|
-
require 'spec_helper'
|
2
|
-
require 'albacore/exec'
|
3
|
-
|
4
|
-
describe Exec, "when executing a command with parameters" do
|
5
|
-
before :all do
|
6
|
-
@nunit = File.join(File.dirname(__FILE__), 'support', 'Tools', 'NUnit-v2.5', 'nunit-console-x86.exe')
|
7
|
-
|
8
|
-
@cmd = Exec.new
|
9
|
-
@cmd.log_level = :verbose
|
10
|
-
@cmd.extend(SystemPatch)
|
11
|
-
@cmd.extend(FailPatch)
|
12
|
-
@cmd.command = @nunit
|
13
|
-
@cmd.parameters "--help"
|
14
|
-
@cmd.execute
|
15
|
-
end
|
16
|
-
|
17
|
-
it "should run the command with the parameters" do
|
18
|
-
@cmd.system_command.should include("\"#{File.expand_path(@nunit)}\" --help")
|
19
|
-
end
|
20
|
-
|
21
|
-
it "should specify the parameters only once" do
|
22
|
-
@cmd.system_command.scan(/--help/).length.should be(1)
|
23
|
-
end
|
24
|
-
|
25
|
-
it "should not fail" do
|
26
|
-
$task_failed.should be_false
|
27
|
-
end
|
28
|
-
end
|
29
|
-
|
30
|
-
describe Exec, "when providing configuration" do
|
31
|
-
let :exec do
|
32
|
-
Albacore.configure do |config|
|
33
|
-
config.exec do |exe|
|
34
|
-
exe.command = "foo.exe"
|
35
|
-
exe.parameters = ["bar", "baz"]
|
36
|
-
end
|
37
|
-
end
|
38
|
-
exec = Exec.new
|
39
|
-
end
|
40
|
-
|
41
|
-
it "should use the configuration" do
|
42
|
-
exec.command.should == "foo.exe"
|
43
|
-
exec.parameters.should == ["bar", "baz"]
|
44
|
-
end
|
45
|
-
end
|
@@ -1,254 +0,0 @@
|
|
1
|
-
require 'spec_helper'
|
2
|
-
require 'albacore/fluentmigratorrunner'
|
3
|
-
|
4
|
-
shared_examples_for "fluentmigrator paths" do
|
5
|
-
before :all do
|
6
|
-
@fluent_migrator_path = File.join(File.dirname(__FILE__), 'support', 'Tools', 'FluentMigrator-0.9', 'Migrate.exe')
|
7
|
-
@test_assembly = File.join(File.expand_path(File.dirname(__FILE__)), 'support', 'CodeCoverage', 'fluentmigrator', 'assemblies', 'TestSolution.FluentMigrator.dll')
|
8
|
-
end
|
9
|
-
end
|
10
|
-
|
11
|
-
describe FluentMigratorRunner, "the command parameters for an migrator runner" do
|
12
|
-
it_should_behave_like "fluentmigrator paths"
|
13
|
-
|
14
|
-
before :all do
|
15
|
-
@migrator = FluentMigratorRunner.new(@fluent_migrator_path)
|
16
|
-
end
|
17
|
-
|
18
|
-
context "Required params" do
|
19
|
-
before :all do
|
20
|
-
@command_parameters = @migrator.get_command_parameters
|
21
|
-
end
|
22
|
-
|
23
|
-
it "doesn't include command" do
|
24
|
-
@command_parameters.should_not include(@fluent_migrator_path)
|
25
|
-
end
|
26
|
-
|
27
|
-
it "includes target" do
|
28
|
-
@command_parameters.should include("/target")
|
29
|
-
end
|
30
|
-
|
31
|
-
it "includes provider" do
|
32
|
-
@command_parameters.should include("/provider")
|
33
|
-
end
|
34
|
-
|
35
|
-
it "includes connection" do
|
36
|
-
@command_parameters.should include("/connection")
|
37
|
-
end
|
38
|
-
end
|
39
|
-
|
40
|
-
context "Optional options" do
|
41
|
-
before :all do
|
42
|
-
@migrator.namespace = 'namespace'
|
43
|
-
@migrator.output = true
|
44
|
-
@migrator.output_filename = "output.txt"
|
45
|
-
@migrator.preview = true
|
46
|
-
@migrator.steps = 1
|
47
|
-
@migrator.task = 'migrate:up'
|
48
|
-
@migrator.version = '001'
|
49
|
-
@migrator.verbose = true
|
50
|
-
@migrator.script_directory = 'c:\scripts'
|
51
|
-
@migrator.profile = 'MyProfile'
|
52
|
-
@migrator.timeout = 90
|
53
|
-
@command_parameters = @migrator.get_command_parameters
|
54
|
-
end
|
55
|
-
|
56
|
-
it "includes ns" do
|
57
|
-
@command_parameters.should include('/ns')
|
58
|
-
end
|
59
|
-
|
60
|
-
it "includes out" do
|
61
|
-
@command_parameters.should include('/out')
|
62
|
-
end
|
63
|
-
|
64
|
-
it "includes outfile" do
|
65
|
-
@command_parameters.should include('/outfile')
|
66
|
-
end
|
67
|
-
|
68
|
-
it "includes preview" do
|
69
|
-
@command_parameters.should include('/preview')
|
70
|
-
end
|
71
|
-
|
72
|
-
it "includes steps" do
|
73
|
-
@command_parameters.should include('/steps')
|
74
|
-
end
|
75
|
-
|
76
|
-
it "includes task" do
|
77
|
-
@command_parameters.should include('/task')
|
78
|
-
end
|
79
|
-
|
80
|
-
it "includes version" do
|
81
|
-
@command_parameters.should include('/version')
|
82
|
-
end
|
83
|
-
|
84
|
-
it "includes verbose" do
|
85
|
-
@command_parameters.should include('/verbose')
|
86
|
-
end
|
87
|
-
|
88
|
-
it "includes wd" do
|
89
|
-
@command_parameters.should include('/wd')
|
90
|
-
end
|
91
|
-
|
92
|
-
it "includes profile" do
|
93
|
-
@command_parameters.should include('/profile')
|
94
|
-
end
|
95
|
-
|
96
|
-
it "includes timeout" do
|
97
|
-
@command_parameters.should include('/timeout')
|
98
|
-
end
|
99
|
-
|
100
|
-
it "excludes help" do
|
101
|
-
@command_parameters.should_not include("/?")
|
102
|
-
end
|
103
|
-
end
|
104
|
-
|
105
|
-
context "Help option" do
|
106
|
-
it "includes help flag when specifed" do
|
107
|
-
@migrator.show_help = true
|
108
|
-
command_parameters = @migrator.get_command_parameters
|
109
|
-
command_parameters.should == " /?"
|
110
|
-
end
|
111
|
-
|
112
|
-
it "excludes help flag when not specifed" do
|
113
|
-
@migrator.show_help = false
|
114
|
-
command_parameters = @migrator.get_command_parameters
|
115
|
-
command_parameters.should_not include "/?"
|
116
|
-
end
|
117
|
-
end
|
118
|
-
|
119
|
-
context "Boolean options" do
|
120
|
-
before :all do
|
121
|
-
@migrator.output = false
|
122
|
-
@migrator.preview = false
|
123
|
-
@migrator.verbose = false
|
124
|
-
end
|
125
|
-
|
126
|
-
it "includes /out when output is true" do
|
127
|
-
@migrator.output = true
|
128
|
-
@migrator.get_command_parameters.should include "/out"
|
129
|
-
end
|
130
|
-
|
131
|
-
it "excludes /out when output not true" do
|
132
|
-
@migrator.output = false
|
133
|
-
@migrator.get_command_parameters.should_not include "/out"
|
134
|
-
@migrator.output = "a"
|
135
|
-
@migrator.get_command_parameters.should_not include "/out"
|
136
|
-
end
|
137
|
-
|
138
|
-
it "includes /preview when preview is true" do
|
139
|
-
@migrator.preview = true
|
140
|
-
@migrator.get_command_parameters.should include "/preview"
|
141
|
-
end
|
142
|
-
|
143
|
-
it "excludes /preview when preview is not true" do
|
144
|
-
@migrator.preview = false
|
145
|
-
@migrator.get_command_parameters.should_not include "/preview"
|
146
|
-
|
147
|
-
@migrator.preview = "a"
|
148
|
-
@migrator.get_command_parameters.should_not include "/preview"
|
149
|
-
end
|
150
|
-
|
151
|
-
it "includes /verbose when verbose is true" do
|
152
|
-
@migrator.verbose = true
|
153
|
-
@migrator.get_command_parameters.should include "/verbose=true"
|
154
|
-
end
|
155
|
-
|
156
|
-
it "excludes /verbose when verbose is not true" do
|
157
|
-
@migrator.verbose = false
|
158
|
-
@migrator.get_command_parameters.should_not include "/verbose="
|
159
|
-
|
160
|
-
@migrator.verbose = "a"
|
161
|
-
@migrator.get_command_parameters.should_not include "/verbose="
|
162
|
-
end
|
163
|
-
end
|
164
|
-
end
|
165
|
-
|
166
|
-
describe FluentMigratorRunner, "the command line string for an fluentmigrator runner" do
|
167
|
-
it_should_behave_like "fluentmigrator paths"
|
168
|
-
|
169
|
-
before :all do
|
170
|
-
migrator = FluentMigratorRunner.new(@fluent_migrator_path)
|
171
|
-
migrator.target = @test_assembly
|
172
|
-
|
173
|
-
@command_line = migrator.get_command_line
|
174
|
-
@command_parameters = migrator.get_command_parameters
|
175
|
-
end
|
176
|
-
|
177
|
-
it "starts with the path to the command" do
|
178
|
-
@command_line.should =~ /^#{@fluent_migrator_path}.*$/
|
179
|
-
end
|
180
|
-
|
181
|
-
it "includes the command parameters" do
|
182
|
-
@command_line.downcase.should include(@command_parameters.downcase)
|
183
|
-
end
|
184
|
-
end
|
185
|
-
|
186
|
-
describe FluentMigratorRunner, "when using the configuration command and not providing a command in the intializer" do
|
187
|
-
it_should_behave_like "fluentmigrator paths"
|
188
|
-
|
189
|
-
before :all do
|
190
|
-
Albacore.configure do |config|
|
191
|
-
config.fluentmigrator.command = "configured command"
|
192
|
-
end
|
193
|
-
@migrator = FluentMigratorRunner.new
|
194
|
-
end
|
195
|
-
|
196
|
-
it "uses the configuration command" do
|
197
|
-
@migrator.command.should == "configured command"
|
198
|
-
end
|
199
|
-
end
|
200
|
-
|
201
|
-
describe FluentMigratorRunner, "when the command has been set through configuration and providing a command in the intializer" do
|
202
|
-
it_should_behave_like "fluentmigrator paths"
|
203
|
-
|
204
|
-
before :all do
|
205
|
-
Albacore.configure do |config|
|
206
|
-
config.fluentmigrator.command = "configured command"
|
207
|
-
end
|
208
|
-
@migrator = FluentMigratorRunner.new("initializer command")
|
209
|
-
end
|
210
|
-
|
211
|
-
it "uses the initializer command" do
|
212
|
-
@migrator.command.should == "initializer command"
|
213
|
-
end
|
214
|
-
end
|
215
|
-
|
216
|
-
describe FluentMigratorRunner, "when configuration has been provided" do
|
217
|
-
before :all do
|
218
|
-
Albacore.configure do |config|
|
219
|
-
config.fluentmigrator do |migrator|
|
220
|
-
migrator.target = 'target.dll'
|
221
|
-
migrator.provider = 'provider'
|
222
|
-
migrator.connection = 'connection'
|
223
|
-
migrator.namespace = 'namespace'
|
224
|
-
migrator.output = 'output.txt'
|
225
|
-
migrator.preview = true
|
226
|
-
migrator.steps = 1
|
227
|
-
migrator.task = 'migrate:up'
|
228
|
-
migrator.version = '001'
|
229
|
-
migrator.verbose = true
|
230
|
-
migrator.script_directory = 'c:\scripts'
|
231
|
-
migrator.profile = 'MyProfile'
|
232
|
-
migrator.timeout = 90
|
233
|
-
end
|
234
|
-
end
|
235
|
-
|
236
|
-
@migrator = FluentMigratorRunner.new
|
237
|
-
end
|
238
|
-
|
239
|
-
it "uses the provided configuration" do
|
240
|
-
@migrator.target.should == 'target.dll'
|
241
|
-
@migrator.provider.should == 'provider'
|
242
|
-
@migrator.connection.should == 'connection'
|
243
|
-
@migrator.namespace.should == 'namespace'
|
244
|
-
@migrator.output.should == 'output.txt'
|
245
|
-
@migrator.preview.should == true
|
246
|
-
@migrator.steps.should == 1
|
247
|
-
@migrator.task.should == 'migrate:up'
|
248
|
-
@migrator.version.should == '001'
|
249
|
-
@migrator.verbose.should == true
|
250
|
-
@migrator.script_directory.should == 'c:\scripts'
|
251
|
-
@migrator.profile.should == 'MyProfile'
|
252
|
-
@migrator.timeout.should == 90
|
253
|
-
end
|
254
|
-
end
|
data/spec/msbuild_spec.rb
DELETED
@@ -1,215 +0,0 @@
|
|
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
|
-
|