albacore 0.2.0.preview1 → 0.2.0.preview2
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- data/README.markdown +7 -2
- data/VERSION +1 -1
- data/install_dependencies.rb +1 -1
- data/lib/albacore.rb +6 -17
- data/lib/albacore/albacoretask.rb +43 -0
- data/lib/albacore/assemblyinfo.rb +10 -7
- data/lib/albacore/config/assemblyinfoconfig.rb +4 -12
- data/lib/albacore/config/config.rb +16 -8
- data/lib/albacore/config/cscconfig.rb +2 -7
- data/lib/albacore/config/docuconfig.rb +3 -5
- data/lib/albacore/config/execconfig.rb +4 -11
- data/lib/albacore/config/msbuildconfig.rb +2 -5
- data/lib/albacore/config/mspectestrunnerconfig.rb +15 -0
- data/lib/albacore/config/nantconfig.rb +4 -11
- data/lib/albacore/config/ncoverconsoleconfig.rb +4 -11
- data/lib/albacore/config/ncoverreportconfig.rb +4 -11
- data/lib/albacore/config/ndependconfig.rb +4 -11
- data/lib/albacore/config/netversion.rb +0 -2
- data/lib/albacore/config/nunittestrunnerconfig.rb +14 -0
- data/lib/albacore/config/specflowreportconfig.rb +2 -5
- data/lib/albacore/config/sqlcmdconfig.rb +4 -11
- data/lib/albacore/config/unzipconfig.rb +4 -11
- data/lib/albacore/config/xbuildconfig.rb +4 -11
- data/lib/albacore/config/xunittestrunnerconfig.rb +15 -0
- data/lib/albacore/config/zipdirectoryconfig.rb +15 -0
- data/lib/albacore/csc.rb +31 -5
- data/lib/albacore/docu.rb +2 -3
- data/lib/albacore/exec.rb +3 -5
- data/lib/albacore/msbuild.rb +3 -3
- data/lib/albacore/mspectestrunner.rb +5 -6
- data/lib/albacore/nant.rb +4 -6
- data/lib/albacore/ncoverconsole.rb +4 -6
- data/lib/albacore/ncoverreport.rb +4 -6
- data/lib/albacore/ncoverreports/codecoveragebase.rb +2 -2
- data/lib/albacore/ncoverreports/cyclomaticcomplexity.rb +2 -2
- data/lib/albacore/ncoverreports/fullcoveragereport.rb +0 -8
- data/lib/albacore/ncoverreports/reportfilterbase.rb +2 -2
- data/lib/albacore/ncoverreports/summaryreport.rb +0 -4
- data/lib/albacore/ndepend.rb +4 -6
- data/lib/albacore/nunittestrunner.rb +4 -5
- data/lib/albacore/specflowreport.rb +2 -2
- data/lib/albacore/sqlcmd.rb +33 -11
- data/lib/albacore/support/createtask.rb +30 -0
- data/lib/albacore/support/runcommand.rb +21 -30
- data/lib/albacore/support/updateattributes.rb +13 -0
- data/lib/albacore/unzip.rb +3 -5
- data/lib/albacore/xbuild.rb +5 -6
- data/lib/albacore/xunittestrunner.rb +4 -5
- data/lib/albacore/zipdirectory.rb +5 -6
- data/rakefile.rb +7 -8
- data/spec/albacoremodel_spec.rb +20 -2
- data/spec/assemblyinfo_spec.rb +27 -14
- data/spec/config_spec.rb +17 -2
- data/spec/createtask_spec.rb +51 -28
- data/spec/csc_spec.rb +135 -3
- data/spec/docu_spec.rb +11 -14
- data/spec/exec_spec.rb +1 -1
- data/spec/msbuild_spec.rb +9 -9
- data/spec/nant_spec.rb +4 -4
- data/spec/ncoverconsole_spec.rb +13 -13
- data/spec/ncoverreport_spec.rb +17 -17
- data/spec/ndepend_spec.rb +6 -6
- data/spec/runcommand_spec.rb +22 -3
- data/spec/sqlcmd_spec.rb +154 -12
- data/spec/support/assemblyinfotester.rb +1 -1
- data/spec/support/spec_helper.rb +2 -2
- data/spec/yamlconfig_spec.rb +3 -3
- data/spec/zip_spec.rb +4 -4
- metadata +32 -119
- data/lib/albacore/albacoremodel.rb +0 -28
- data/lib/albacore/config/mspecconfig.rb +0 -21
- data/lib/albacore/config/nunitconfig.rb +0 -20
- data/lib/albacore/config/xunitconfig.rb +0 -22
- data/lib/albacore/config/zipconfig.rb +0 -22
- data/lib/rake/assemblyinfotask.rb +0 -3
- data/lib/rake/csctask.rb +0 -3
- data/lib/rake/docutask.rb +0 -3
- data/lib/rake/exectask.rb +0 -3
- data/lib/rake/msbuildtask.rb +0 -3
- data/lib/rake/mspectask.rb +0 -3
- data/lib/rake/nanttask.rb +0 -3
- data/lib/rake/ncoverconsoletask.rb +0 -3
- data/lib/rake/ncoverreporttask.rb +0 -3
- data/lib/rake/ndependtask.rb +0 -3
- data/lib/rake/nunittask.rb +0 -3
- data/lib/rake/specflowreporttask.rb +0 -3
- data/lib/rake/sqlcmdtask.rb +0 -3
- data/lib/rake/support/albacoretask.rb +0 -30
- data/lib/rake/support/createtask.rb +0 -21
- data/lib/rake/unziptask.rb +0 -3
- data/lib/rake/xbuildtask.rb +0 -7
- data/lib/rake/xunittask.rb +0 -3
- data/lib/rake/ziptask.rb +0 -3
- data/spec/assemblyinfotask_spec.rb +0 -32
- data/spec/csctask_spec.rb +0 -1
- data/spec/docutask_spec.rb +0 -52
- data/spec/exectask_spec.rb +0 -46
- data/spec/msbuildtask_spec.rb +0 -46
- data/spec/mspectask_spec.rb +0 -46
- data/spec/nanttask_spec.rb +0 -46
- data/spec/ncoverconsoletask_spec.rb +0 -46
- data/spec/ncoverreporttask_spec.rb +0 -46
- data/spec/ndependtask_spec.rb +0 -46
- data/spec/nunittask_spec.rb +0 -46
- data/spec/spec.opts +0 -1
- data/spec/specflowreporttask_spec.rb +0 -48
- data/spec/sqlcmdtask_spec.rb +0 -32
- data/spec/support/AssemblyInfo/assemblyinfo.yml +0 -2
- data/spec/support/CodeCoverage/mspec/assemblies/Machine.Specifications.NUnit.dll +0 -0
- data/spec/support/CodeCoverage/mspec/assemblies/Machine.Specifications.dll +0 -0
- data/spec/support/CodeCoverage/mspec/assemblies/TestSolution.MSpecTests.dll +0 -0
- data/spec/support/CodeCoverage/mspec/assemblies/TestSolution.dll +0 -0
- data/spec/support/CodeCoverage/mspec/assemblies/nunit.framework.dll +0 -0
- data/spec/support/CodeCoverage/nunit/assemblies/TestSolution.Tests.dll +0 -0
- data/spec/support/CodeCoverage/nunit/assemblies/TestSolution.dll +0 -0
- data/spec/support/CodeCoverage/nunit/assemblies/nunit.framework.dll +0 -0
- data/spec/support/CodeCoverage/nunit/assemblies/with spaces/TestSolution.Tests.dll +0 -0
- data/spec/support/CodeCoverage/nunit/assemblies/with spaces/TestSolution.dll +0 -0
- data/spec/support/CodeCoverage/nunit/assemblies/with spaces/nunit.framework.dll +0 -0
- data/spec/support/CodeCoverage/nunit/failing_assemblies/TestSolution.FailingTests.dll +0 -0
- data/spec/support/CodeCoverage/nunit/failing_assemblies/nunit.framework.dll +0 -0
- data/spec/support/CodeCoverage/report/coverage.xml +0 -4578
- data/spec/support/CodeCoverage/xunit/assemblies/TestSolution.XUnitTests.dll +0 -0
- data/spec/support/CodeCoverage/xunit/assemblies/TestSolution.dll +0 -0
- data/spec/support/CodeCoverage/xunit/assemblies/xunit.dll +0 -0
- data/spec/support/CodeCoverage/xunit/assemblies/xunit.xml +0 -2306
- data/spec/support/SpecFlow/TechTalk.SpecFlow.dll +0 -0
- data/spec/support/SpecFlow/TestSolution.SpecFlow.dll +0 -0
- data/spec/support/SpecFlow/TestSolution.SpecFlow.pdb +0 -0
- data/spec/support/SpecFlow/TestSolution.dll +0 -0
- data/spec/support/SpecFlow/TestSolution.pdb +0 -0
- data/spec/support/SpecFlow/nunit.framework.dll +0 -0
- data/spec/support/TestSolution/NDependProject.xml +0 -315
- data/spec/support/TestSolution/TestSolution.5.0.ReSharper.user +0 -27
- data/spec/support/TestSolution/TestSolution.FailingTests/FailingTestFixture.cs +0 -19
- data/spec/support/TestSolution/TestSolution.FailingTests/Properties/AssemblyInfo.cs +0 -36
- data/spec/support/TestSolution/TestSolution.FailingTests/TestSolution.FailingTests.csproj +0 -63
- data/spec/support/TestSolution/TestSolution.MSpecTests/Properties/AssemblyInfo.cs +0 -36
- data/spec/support/TestSolution/TestSolution.MSpecTests/SomeSpecTest.cs +0 -18
- data/spec/support/TestSolution/TestSolution.MSpecTests/TestSolution.MSpecTests.csproj +0 -77
- data/spec/support/TestSolution/TestSolution.SpecFlow/OneFeature.feature +0 -8
- data/spec/support/TestSolution/TestSolution.SpecFlow/OneFeature.feature.cs +0 -73
- data/spec/support/TestSolution/TestSolution.SpecFlow/Properties/AssemblyInfo.cs +0 -36
- data/spec/support/TestSolution/TestSolution.SpecFlow/StepDefinition.cs +0 -30
- data/spec/support/TestSolution/TestSolution.SpecFlow/TestSolution.SpecFlow.csproj +0 -84
- data/spec/support/TestSolution/TestSolution.Tests/Properties/AssemblyInfo.cs +0 -36
- data/spec/support/TestSolution/TestSolution.Tests/SomeTestFixture.cs +0 -23
- data/spec/support/TestSolution/TestSolution.Tests/TestSolution.Tests.csproj +0 -69
- data/spec/support/TestSolution/TestSolution.XUnitTests/Class1.cs +0 -19
- data/spec/support/TestSolution/TestSolution.XUnitTests/FailingTestFixture.cs +0 -14
- data/spec/support/TestSolution/TestSolution.XUnitTests/Properties/AssemblyInfo.cs +0 -36
- data/spec/support/TestSolution/TestSolution.XUnitTests/TestSolution.XUnitTests.csproj +0 -70
- data/spec/support/TestSolution/TestSolution.build +0 -25
- data/spec/support/TestSolution/TestSolution.sln +0 -50
- data/spec/support/TestSolution/TestSolution/Class1.cs +0 -17
- data/spec/support/TestSolution/TestSolution/Properties/AssemblyInfo.cs +0 -36
- data/spec/support/TestSolution/TestSolution/TestSolution.csproj +0 -59
- data/spec/support/csc/File1.cs +0 -9
- data/spec/support/csc/File2.cs +0 -9
- data/spec/support/csc/output/ignorethis.txt +0 -1
- data/spec/support/test.yml +0 -4
- data/spec/support/yamlconfig/msbuild.yml +0 -5
- data/spec/support/yamlconfig/yaml_autoconfig_test.yml +0 -1
- data/spec/support/zip/files/subfolder/sub file.txt +0 -1
- data/spec/support/zip/files/testfile.txt +0 -1
- data/spec/xunittask_spec.rb +0 -32
- data/spec/ziptask_spec.rb +0 -33
data/spec/config_spec.rb
CHANGED
@@ -1,8 +1,17 @@
|
|
1
1
|
require File.join(File.dirname(__FILE__), 'support', 'spec_helper')
|
2
|
-
require 'albacore/
|
2
|
+
require 'albacore/albacoretask'
|
3
|
+
require 'albacore/config/config'
|
3
4
|
|
4
5
|
class ConfigTest
|
5
|
-
include
|
6
|
+
include AlbacoreTask
|
7
|
+
end
|
8
|
+
|
9
|
+
module ConfigModuleTest
|
10
|
+
include Albacore::Configuration
|
11
|
+
|
12
|
+
def mixin_worked
|
13
|
+
true
|
14
|
+
end
|
6
15
|
end
|
7
16
|
|
8
17
|
describe "when configuring log level to verbose" do
|
@@ -17,3 +26,9 @@ describe "when configuring log level to verbose" do
|
|
17
26
|
test.log_level.should == :verbose
|
18
27
|
end
|
19
28
|
end
|
29
|
+
|
30
|
+
describe "when including Albacore::Configuration in a module" do
|
31
|
+
it "should mix the module into the Albacore.configuration" do
|
32
|
+
Albacore.configuration.mixin_worked.should be_true
|
33
|
+
end
|
34
|
+
end
|
data/spec/createtask_spec.rb
CHANGED
@@ -1,9 +1,9 @@
|
|
1
1
|
require File.join(File.dirname(__FILE__), 'support', 'spec_helper')
|
2
|
-
require 'albacore/
|
2
|
+
require 'albacore/albacoretask'
|
3
3
|
require 'fail_patch'
|
4
4
|
|
5
5
|
class SampleObject
|
6
|
-
include
|
6
|
+
include AlbacoreTask
|
7
7
|
|
8
8
|
attr_array :array
|
9
9
|
attr_hash :hash
|
@@ -15,10 +15,13 @@ class SampleObject
|
|
15
15
|
def get_hash
|
16
16
|
@hash
|
17
17
|
end
|
18
|
+
|
19
|
+
def execute
|
20
|
+
end
|
18
21
|
end
|
19
22
|
|
20
23
|
class RunCommandObject
|
21
|
-
include
|
24
|
+
include AlbacoreTask
|
22
25
|
include RunCommand
|
23
26
|
|
24
27
|
def execute
|
@@ -26,27 +29,25 @@ class RunCommandObject
|
|
26
29
|
end
|
27
30
|
end
|
28
31
|
|
32
|
+
class ConfigByNameOverride < SampleObject
|
33
|
+
attr_accessor :task_name
|
34
|
+
def load_config_by_task_name(name)
|
35
|
+
@task_name = name
|
36
|
+
end
|
37
|
+
end
|
38
|
+
|
29
39
|
describe "when defining a task" do
|
30
40
|
before :all do
|
31
|
-
|
32
|
-
@sample_object.stub_method(:load_config_by_task_name){ |name|
|
33
|
-
@task_name = name
|
34
|
-
}
|
35
|
-
|
36
|
-
task_object_proc = Proc.new { @sample_object }
|
37
|
-
create_task :sampletask, task_object_proc do |obj|
|
38
|
-
@task_obj = obj
|
39
|
-
end
|
41
|
+
Albacore.create_task :sampletask, ConfigByNameOverride
|
40
42
|
|
41
43
|
sampletask :sample do |x|
|
42
|
-
x.extend(FailPatch)
|
43
44
|
@config_obj = x
|
44
45
|
end
|
45
46
|
Rake::Task[:sample].invoke
|
46
47
|
end
|
47
48
|
|
48
49
|
it "should yield the object for configuration" do
|
49
|
-
@config_obj.should ==
|
50
|
+
@config_obj.class.should == ConfigByNameOverride
|
50
51
|
end
|
51
52
|
|
52
53
|
it "should yield the object for execution" do
|
@@ -54,13 +55,13 @@ describe "when defining a task" do
|
|
54
55
|
end
|
55
56
|
|
56
57
|
it "should call the yaml configuration by task name" do
|
57
|
-
@task_name.should ==
|
58
|
+
@config_obj.task_name.should == :sample
|
58
59
|
end
|
59
60
|
end
|
60
61
|
|
61
62
|
describe "when execution fails" do
|
62
63
|
before :all do
|
63
|
-
create_task :failing_task,
|
64
|
+
Albacore.create_task :failing_task, SampleObject
|
64
65
|
|
65
66
|
failing_task :sample_fail do |x|
|
66
67
|
x.extend(FailPatch)
|
@@ -76,12 +77,12 @@ end
|
|
76
77
|
|
77
78
|
describe "when task args are used" do
|
78
79
|
before :all do
|
79
|
-
create_task :task_with_args,
|
80
|
+
Albacore.create_task :task_with_args, SampleObject
|
80
81
|
|
81
82
|
task_with_args :sampletask_withargs, [:arg1] do |t, args|
|
82
|
-
t.extend(FailPatch)
|
83
83
|
@args = args
|
84
84
|
end
|
85
|
+
|
85
86
|
Rake::Task[:sampletask_withargs].invoke("test")
|
86
87
|
end
|
87
88
|
|
@@ -92,7 +93,7 @@ end
|
|
92
93
|
|
93
94
|
describe "when calling a task method without providing a task name" do
|
94
95
|
before :all do
|
95
|
-
create_task :task_without_name,
|
96
|
+
Albacore.create_task :task_without_name, SampleObject
|
96
97
|
|
97
98
|
task_without_name do |t|
|
98
99
|
@task_without_name_called = true
|
@@ -108,7 +109,7 @@ end
|
|
108
109
|
|
109
110
|
describe "when calling a task method without providing a task parameter" do
|
110
111
|
before :all do
|
111
|
-
create_task :task_without_param,
|
112
|
+
Albacore.create_task :task_without_param, SampleObject
|
112
113
|
|
113
114
|
task_without_param do
|
114
115
|
@task_without_param_called = true
|
@@ -125,7 +126,7 @@ end
|
|
125
126
|
describe "when calling a task without a task definition block" do
|
126
127
|
|
127
128
|
before :all do
|
128
|
-
create_task :task_without_body,
|
129
|
+
Albacore.create_task :task_without_body, SampleObject
|
129
130
|
|
130
131
|
task_without_body
|
131
132
|
|
@@ -144,10 +145,7 @@ end
|
|
144
145
|
|
145
146
|
describe "when creating two tasks and executing them" do
|
146
147
|
before :all do
|
147
|
-
create_task :multiple_instance_task,
|
148
|
-
@array_values = mi.get_array
|
149
|
-
@hash_values = mi.get_hash
|
150
|
-
end
|
148
|
+
Albacore.create_task :multiple_instance_task, SampleObject
|
151
149
|
|
152
150
|
multiple_instance_task :multi_instance_1 do |mi|
|
153
151
|
mi.array 1, 2
|
@@ -166,11 +164,13 @@ describe "when creating two tasks and executing them" do
|
|
166
164
|
end
|
167
165
|
|
168
166
|
it "should specify the array values once per task" do
|
169
|
-
@
|
167
|
+
@instance_1.array.should == [1, 2]
|
168
|
+
@instance_2.array.should == [3, 4]
|
170
169
|
end
|
171
170
|
|
172
171
|
it "should specify the hash values once per task" do
|
173
|
-
@
|
172
|
+
@instance_1.hash.should == { :a => :b, :c => :d }
|
173
|
+
@instance_2.hash.should == { :e => :f, :g => :h }
|
174
174
|
end
|
175
175
|
|
176
176
|
it "should create two separate instances of the task object" do
|
@@ -180,7 +180,7 @@ end
|
|
180
180
|
|
181
181
|
describe "when running two instances of a command line task" do
|
182
182
|
before :all do
|
183
|
-
create_task :run_command_task,
|
183
|
+
Albacore.create_task :run_command_task, RunCommandObject do |ex|
|
184
184
|
ex.execute
|
185
185
|
end
|
186
186
|
|
@@ -211,3 +211,26 @@ describe "when running two instances of a command line task" do
|
|
211
211
|
end
|
212
212
|
end
|
213
213
|
|
214
|
+
describe "when adding prerequisites through the rake api" do
|
215
|
+
let :obj do
|
216
|
+
Albacore.create_task :dependency_task, Object
|
217
|
+
|
218
|
+
require 'ostruct'
|
219
|
+
obj = OpenStruct.new
|
220
|
+
|
221
|
+
task :first_task
|
222
|
+
task :second_task do
|
223
|
+
obj.dependency_called = true
|
224
|
+
end
|
225
|
+
|
226
|
+
firsttask = Rake::Task[:first_task]
|
227
|
+
firsttask.enhance [:second_task]
|
228
|
+
firsttask.invoke
|
229
|
+
|
230
|
+
obj
|
231
|
+
end
|
232
|
+
|
233
|
+
it "should call the dependent tasks" do
|
234
|
+
obj.dependency_called.should be_true
|
235
|
+
end
|
236
|
+
end
|
data/spec/csc_spec.rb
CHANGED
@@ -73,15 +73,147 @@ end
|
|
73
73
|
describe CSC, "when version to use has been configured and overriding" do
|
74
74
|
let :csc do
|
75
75
|
Albacore.configure do |config|
|
76
|
-
config.csc.use :
|
76
|
+
config.csc.use :net2
|
77
77
|
end
|
78
78
|
csc = CSC.new
|
79
|
-
csc.use :
|
79
|
+
csc.use :net35
|
80
80
|
csc
|
81
81
|
end
|
82
82
|
|
83
83
|
it "should use the override version" do
|
84
84
|
win_dir = ENV['windir'] || ENV['WINDIR'] || "C:/Windows"
|
85
|
-
csc.command.should == File.join(win_dir.dup, 'Microsoft.NET', 'Framework', '
|
85
|
+
csc.command.should == File.join(win_dir.dup, 'Microsoft.NET', 'Framework', 'v3.5', 'csc.exe')
|
86
|
+
end
|
87
|
+
end
|
88
|
+
|
89
|
+
describe CSC, "when specifying 2 resources to include" do
|
90
|
+
let :csc do
|
91
|
+
csc = CSC.new
|
92
|
+
csc.resources "../some/file.resource", "another.resource"
|
93
|
+
|
94
|
+
csc.extend(SystemPatch)
|
95
|
+
csc.disable_system = true
|
96
|
+
csc.execute
|
97
|
+
csc
|
98
|
+
end
|
99
|
+
|
100
|
+
it "should include the first resource" do
|
101
|
+
csc.system_command.should include("/res:../some/file.resource")
|
102
|
+
end
|
103
|
+
|
104
|
+
it "should include the second resource" do
|
105
|
+
csc.system_command.should include("/res:another.resource")
|
106
|
+
end
|
107
|
+
end
|
108
|
+
|
109
|
+
describe CSC, "when specifying the optimize option" do
|
110
|
+
let :csc do
|
111
|
+
csc = CSC.new
|
112
|
+
csc.optimize = true
|
113
|
+
|
114
|
+
csc.extend(SystemPatch)
|
115
|
+
csc.disable_system = true
|
116
|
+
csc.execute
|
117
|
+
csc
|
118
|
+
end
|
119
|
+
|
120
|
+
it "should supply the optimize parameter" do
|
121
|
+
csc.system_command.should include("/optimize")
|
122
|
+
end
|
123
|
+
end
|
124
|
+
|
125
|
+
describe CSC, "when specifying debug information be generated" do
|
126
|
+
let :csc do
|
127
|
+
csc = CSC.new
|
128
|
+
csc.debug = true
|
129
|
+
|
130
|
+
csc.extend(SystemPatch)
|
131
|
+
csc.disable_system = true
|
132
|
+
csc.execute
|
133
|
+
csc
|
134
|
+
end
|
135
|
+
|
136
|
+
it "should provide the debug parameter" do
|
137
|
+
csc.system_command.should include("/debug")
|
138
|
+
end
|
139
|
+
end
|
140
|
+
|
141
|
+
describe CSC, "when specifying full debug information be generated" do
|
142
|
+
let :csc do
|
143
|
+
csc = CSC.new
|
144
|
+
csc.debug = :full
|
145
|
+
|
146
|
+
csc.extend(SystemPatch)
|
147
|
+
csc.disable_system = true
|
148
|
+
csc.execute
|
149
|
+
csc
|
150
|
+
end
|
151
|
+
|
152
|
+
it "should provide the full debug parameter" do
|
153
|
+
csc.system_command.should include("/debug:full")
|
154
|
+
end
|
155
|
+
end
|
156
|
+
|
157
|
+
describe CSC, "when specifying pdbonly debug information be generated" do
|
158
|
+
let :csc do
|
159
|
+
csc = CSC.new
|
160
|
+
csc.debug = :pdbonly
|
161
|
+
|
162
|
+
csc.extend(SystemPatch)
|
163
|
+
csc.disable_system = true
|
164
|
+
csc.execute
|
165
|
+
csc
|
166
|
+
end
|
167
|
+
|
168
|
+
it "should provide the pdbonly debug parameter" do
|
169
|
+
csc.system_command.should include("/debug:pdbonly")
|
170
|
+
end
|
171
|
+
end
|
172
|
+
|
173
|
+
describe CSC, "when specifying debug information not be generated" do
|
174
|
+
let :csc do
|
175
|
+
csc = CSC.new
|
176
|
+
csc.debug = false
|
177
|
+
|
178
|
+
csc.extend(SystemPatch)
|
179
|
+
csc.disable_system = true
|
180
|
+
csc.execute
|
181
|
+
csc
|
182
|
+
end
|
183
|
+
|
184
|
+
it "should not provide the debug parameter" do
|
185
|
+
csc.system_command.should_not include("/debug")
|
186
|
+
end
|
187
|
+
end
|
188
|
+
|
189
|
+
describe CSC, "when specifying an xml document to generate" do
|
190
|
+
let :csc do
|
191
|
+
csc = CSC.new
|
192
|
+
csc.doc = "../path/to/docfile.xml"
|
193
|
+
|
194
|
+
csc.extend(SystemPatch)
|
195
|
+
csc.disable_system = true
|
196
|
+
csc.execute
|
197
|
+
csc
|
198
|
+
end
|
199
|
+
|
200
|
+
it "should provide the documentation parmaeter" do
|
201
|
+
csc.system_command.should include("/doc:../path/to/docfile.xml")
|
202
|
+
end
|
203
|
+
end
|
204
|
+
|
205
|
+
describe CSC, "when defining processor symbols" do
|
206
|
+
let :csc do
|
207
|
+
csc = CSC.new
|
208
|
+
csc.define :symbol1, :symbol2
|
209
|
+
|
210
|
+
csc.extend(SystemPatch)
|
211
|
+
csc.disable_system = true
|
212
|
+
csc.execute
|
213
|
+
csc
|
214
|
+
end
|
215
|
+
|
216
|
+
it "should specify the defined symbols" do
|
217
|
+
csc.system_command.should include("/define:symbol1;symbol2")
|
86
218
|
end
|
87
219
|
end
|
data/spec/docu_spec.rb
CHANGED
@@ -69,6 +69,17 @@ describe Docu, "when building docs with an output location specified" do
|
|
69
69
|
end
|
70
70
|
end
|
71
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
|
+
|
72
83
|
describe Docu, "when the command has been provided through configuration" do
|
73
84
|
let :docu do
|
74
85
|
Albacore.configure do |config|
|
@@ -96,17 +107,3 @@ describe Docu, "when the command has been provided through configuration and is
|
|
96
107
|
docu.command.should == "override"
|
97
108
|
end
|
98
109
|
end
|
99
|
-
|
100
|
-
describe Docu, "when no command has been specified" do
|
101
|
-
let :docu do
|
102
|
-
class Albacore::Configuration
|
103
|
-
include Configuration::Docu
|
104
|
-
end
|
105
|
-
docu = Docu.new
|
106
|
-
docu
|
107
|
-
end
|
108
|
-
|
109
|
-
it "should default to the standard docu.exe" do
|
110
|
-
docu.command.should == "Docu.exe"
|
111
|
-
end
|
112
|
-
end
|
data/spec/exec_spec.rb
CHANGED
@@ -15,7 +15,7 @@ describe Exec, "when executing a command with parameters" do
|
|
15
15
|
end
|
16
16
|
|
17
17
|
it "should run the command with the parameters" do
|
18
|
-
@cmd.system_command.should include("\"#{@nunit}\" --help")
|
18
|
+
@cmd.system_command.should include("\"#{File.expand_path(@nunit)}\" --help")
|
19
19
|
end
|
20
20
|
|
21
21
|
it "should specify the parameters only once" do
|
data/spec/msbuild_spec.rb
CHANGED
@@ -18,13 +18,13 @@ describe MSBuild, "when building a solution with verbose logging turned on" do
|
|
18
18
|
|
19
19
|
before :all do
|
20
20
|
@msbuild.solution = @testdata.solution_path
|
21
|
-
@msbuild.
|
21
|
+
@msbuild.execute
|
22
22
|
|
23
23
|
@log_data = @strio.string
|
24
24
|
end
|
25
25
|
|
26
26
|
it "should log the msbuild command line being called" do
|
27
|
-
@log_data.should include("Executing MSBuild: \"C
|
27
|
+
@log_data.should include("Executing MSBuild: \"C:/Windows/Microsoft.NET/Framework/v4.0.30319/MSBuild.exe\"")
|
28
28
|
end
|
29
29
|
end
|
30
30
|
|
@@ -33,7 +33,7 @@ describe MSBuild, "when building with no solution specified" do
|
|
33
33
|
|
34
34
|
before :all do
|
35
35
|
@msbuild.extend(FailPatch)
|
36
|
-
@msbuild.
|
36
|
+
@msbuild.execute
|
37
37
|
@log_data = @strio.string
|
38
38
|
end
|
39
39
|
|
@@ -100,7 +100,7 @@ describe MSBuild, "when building a visual studio solution" do
|
|
100
100
|
|
101
101
|
before :all do
|
102
102
|
@msbuild.solution = @testdata.solution_path
|
103
|
-
@msbuild.
|
103
|
+
@msbuild.execute
|
104
104
|
end
|
105
105
|
|
106
106
|
it "should output the solution's binaries" do
|
@@ -114,7 +114,7 @@ describe MSBuild, "when building a visual studio solution with a single target"
|
|
114
114
|
before :all do
|
115
115
|
@msbuild.solution = @testdata.solution_path
|
116
116
|
@msbuild.targets :Rebuild
|
117
|
-
@msbuild.
|
117
|
+
@msbuild.execute
|
118
118
|
end
|
119
119
|
|
120
120
|
it "should output the solution's binaries" do
|
@@ -129,7 +129,7 @@ describe MSBuild, "when building a visual studio solution for a specified config
|
|
129
129
|
|
130
130
|
@msbuild.properties :configuration => :Release
|
131
131
|
@msbuild.solution = @testdata.solution_path
|
132
|
-
@msbuild.
|
132
|
+
@msbuild.execute
|
133
133
|
end
|
134
134
|
|
135
135
|
it "should build with the specified configuration as a property" do
|
@@ -147,7 +147,7 @@ describe MSBuild, "when specifying targets to build" do
|
|
147
147
|
before :all do
|
148
148
|
@msbuild.targets :Clean, :Build
|
149
149
|
@msbuild.solution = @testdata.solution_path
|
150
|
-
@msbuild.
|
150
|
+
@msbuild.execute
|
151
151
|
end
|
152
152
|
|
153
153
|
it "should build the targets" do
|
@@ -162,7 +162,7 @@ describe MSBuild, "when building a solution with a specific msbuild verbosity" d
|
|
162
162
|
before :all do
|
163
163
|
@msbuild.verbosity = "normal"
|
164
164
|
@msbuild.solution = @testdata.solution_path
|
165
|
-
@msbuild.
|
165
|
+
@msbuild.execute
|
166
166
|
end
|
167
167
|
|
168
168
|
it "should call msbuild with the specified verbosity" do
|
@@ -179,7 +179,7 @@ describe MSBuild, "when specifying multiple configuration properties" do
|
|
179
179
|
@msbuild.targets :Clean, :Build
|
180
180
|
@msbuild.properties :configuration => :Debug, :DebugSymbols => true
|
181
181
|
@msbuild.solution = @testdata.solution_path
|
182
|
-
@msbuild.
|
182
|
+
@msbuild.execute
|
183
183
|
end
|
184
184
|
|
185
185
|
it "should specify the first property" do
|