albacore 0.0.9 → 0.1.0
Sign up to get free protection for your applications and to get access to all the features.
- data/README.markdown +84 -81
- data/VERSION +1 -1
- data/install_dependencies.rb +10 -10
- data/lib/albacore.rb +10 -2
- data/lib/albacore/assemblyinfo.rb +100 -100
- data/lib/albacore/assemblyinfolanguages/csharpengine.rb +14 -0
- data/lib/albacore/assemblyinfolanguages/vbnetengine.rb +14 -0
- data/lib/albacore/docu.rb +39 -0
- data/lib/albacore/exec.rb +23 -0
- data/lib/albacore/expandtemplates.rb +73 -71
- data/lib/albacore/msbuild.rb +56 -61
- data/lib/albacore/mspectestrunner.rb +44 -42
- data/lib/albacore/nant.rb +39 -0
- data/lib/albacore/ncoverconsole.rb +68 -61
- data/lib/albacore/ncoverreport.rb +56 -55
- data/lib/albacore/ncoverreports/assemblyfilter.rb +7 -7
- data/lib/albacore/ncoverreports/branchcoverage.rb +7 -7
- data/lib/albacore/ncoverreports/classfilter.rb +5 -5
- data/lib/albacore/ncoverreports/codecoveragebase.rb +22 -22
- data/lib/albacore/ncoverreports/cyclomaticcomplexity.rb +19 -19
- data/lib/albacore/ncoverreports/documentfilter.rb +5 -5
- data/lib/albacore/ncoverreports/fullcoveragereport.rb +17 -17
- data/lib/albacore/ncoverreports/methodcoverage.rb +7 -7
- data/lib/albacore/ncoverreports/methodfilter.rb +5 -5
- data/lib/albacore/ncoverreports/namespacefilter.rb +5 -5
- data/lib/albacore/ncoverreports/reportfilterbase.rb +23 -23
- data/lib/albacore/ncoverreports/summaryreport.rb +18 -18
- data/lib/albacore/ncoverreports/symbolcoverage.rb +6 -7
- data/lib/albacore/ndepend.rb +35 -0
- data/lib/albacore/nunittestrunner.rb +36 -35
- data/lib/albacore/plink.rb +48 -0
- data/lib/albacore/sftp.rb +33 -31
- data/lib/albacore/sqlcmd.rb +54 -51
- data/lib/albacore/ssh.rb +35 -33
- data/lib/albacore/support/albacore_helper.rb +1 -4
- data/lib/albacore/support/attrmethods.rb +25 -0
- data/lib/albacore/support/failure.rb +17 -17
- data/lib/albacore/support/globalconfig.rb +6 -0
- data/lib/albacore/support/logging.rb +30 -28
- data/lib/albacore/support/runcommand.rb +41 -41
- data/lib/albacore/support/yamlconfig.rb +23 -27
- data/lib/albacore/unzip.rb +28 -0
- data/lib/albacore/xbuild.rb +54 -0
- data/lib/albacore/xunittestrunner.rb +40 -43
- data/lib/albacore/zipdirectory.rb +72 -63
- data/lib/rake/assemblyinfotask.rb +12 -11
- data/lib/rake/docutask.rb +17 -0
- data/lib/rake/exectask.rb +18 -0
- data/lib/rake/expandtemplatestask.rb +12 -11
- data/lib/rake/msbuildtask.rb +13 -12
- data/lib/rake/mspectask.rb +12 -11
- data/lib/rake/nanttask.rb +17 -0
- data/lib/rake/ncoverconsoletask.rb +12 -11
- data/lib/rake/ncoverreporttask.rb +12 -11
- data/lib/rake/ndependtask.rb +23 -0
- data/lib/rake/nunittask.rb +12 -11
- data/lib/rake/plinktask.rb +23 -0
- data/lib/rake/renametask.rb +15 -15
- data/lib/rake/sftptask.rb +11 -10
- data/lib/rake/sqlcmdtask.rb +13 -12
- data/lib/rake/sshtask.rb +11 -10
- data/lib/rake/support/albacoretask.rb +16 -15
- data/lib/rake/unziptask.rb +17 -0
- data/lib/rake/xbuildtask.rb +22 -0
- data/lib/rake/xunittask.rb +12 -11
- data/lib/rake/ziptask.rb +12 -11
- data/rakefile.rb +255 -204
- data/spec/assemblyinfo_spec.rb +426 -221
- data/spec/assemblyinfotask_spec.rb +21 -21
- data/spec/docu_spec.rb +70 -0
- data/spec/docutask_spec.rb +39 -0
- data/spec/exec_spec.rb +23 -0
- data/spec/exectask_spec.rb +31 -0
- data/spec/expandtemplates_spec.rb +149 -148
- data/spec/expandtemplatestask_spec.rb +21 -21
- data/spec/msbuild_spec.rb +150 -139
- data/spec/msbuildtask_spec.rb +21 -21
- data/spec/mspectask_spec.rb +21 -21
- data/spec/nant_spec.rb +101 -0
- data/spec/nanttask_spec.rb +31 -0
- data/spec/ncoverconsole_spec.rb +253 -221
- data/spec/ncoverconsoletask_spec.rb +21 -21
- data/spec/ncoverreport_spec.rb +538 -523
- data/spec/ncoverreporttask_spec.rb +21 -21
- data/spec/ndepend_spec.rb +49 -0
- data/spec/{commandtask_spec.rb → ndependtask_spec.rb} +10 -10
- data/spec/nunittask_spec.rb +21 -21
- data/spec/nunittestrunner_spec.rb +6 -6
- data/spec/patches/docu_patch.rb +13 -0
- data/spec/patches/system_patch.rb +18 -18
- data/spec/patches/tasklib_patch.rb +10 -10
- data/spec/plink_spec.rb +61 -0
- data/spec/plinktask_spec.rb +31 -0
- data/spec/renametask_spec.rb +21 -21
- data/spec/sftp_spec.rb +24 -24
- data/spec/sftptask_spec.rb +31 -31
- data/spec/sqlcmd_spec.rb +118 -120
- data/spec/sqlcmdtask_spec.rb +21 -21
- data/spec/ssh_spec.rb +36 -37
- data/spec/sshtask_spec.rb +29 -29
- data/spec/support/TestSolution/NDependProject.xml +315 -0
- data/spec/support/TestSolution/TestSolution.XUnitTests/Class1.cs +12 -12
- data/spec/support/TestSolution/TestSolution.XUnitTests/FailingTestFixture.cs +14 -0
- data/spec/support/TestSolution/TestSolution.XUnitTests/TestSolution.XUnitTests.csproj +1 -0
- data/spec/support/TestSolution/TestSolution.build +25 -0
- data/spec/support/assemblyinfotester.rb +40 -38
- data/spec/support/expandtemplatestestdata.rb +73 -73
- data/spec/support/msbuildtestdata.rb +28 -28
- data/spec/support/nanttestdata.rb +33 -0
- data/spec/support/ncoverconsoletestdata.rb +18 -0
- data/spec/support/ncoverreporttestdata.rb +24 -24
- data/spec/support/spec_helper.rb +2 -1
- data/spec/support/yamlconfig/msbuild.yml +3 -0
- data/spec/support/yamlconfig/yaml_autoconfig_test.yml +1 -0
- data/spec/support/ziptestdata.rb +11 -6
- data/spec/xunit_spec.rb +63 -0
- data/spec/xunittask_spec.rb +19 -19
- data/spec/yamlconfig_spec.rb +38 -52
- data/spec/zip_spec.rb +56 -11
- data/spec/ziptask_spec.rb +22 -22
- metadata +53 -8
- data/lib/albacore/command.rb +0 -23
- data/lib/rake/commandtask.rb +0 -16
- data/spec/command_spec.rb +0 -23
data/spec/assemblyinfo_spec.rb
CHANGED
@@ -3,244 +3,449 @@ require 'assemblyinfotester'
|
|
3
3
|
require 'albacore/assemblyinfo'
|
4
4
|
|
5
5
|
describe AssemblyInfo, "when generating an assembly info file" do
|
6
|
-
|
7
|
-
|
8
|
-
|
9
|
-
|
10
|
-
|
11
|
-
|
12
|
-
|
13
|
-
|
14
|
-
|
15
|
-
|
16
|
-
|
17
|
-
|
18
|
-
|
19
|
-
|
6
|
+
before :all do
|
7
|
+
@tester = AssemblyInfoTester.new
|
8
|
+
asm = AssemblyInfo.new
|
9
|
+
strio = StringIO.new
|
10
|
+
asm.log_device = strio
|
11
|
+
|
12
|
+
@tester.build_and_read_assemblyinfo_file asm
|
13
|
+
|
14
|
+
@log_data = strio.string
|
15
|
+
end
|
16
|
+
|
17
|
+
it "should log the name of the output file" do
|
18
|
+
@log_data.should include(@tester.assemblyinfo_file)
|
19
|
+
end
|
20
20
|
end
|
21
21
|
|
22
22
|
describe AssemblyInfo, "when generating an assembly info file in verbose mode" do
|
23
|
-
|
24
|
-
|
25
|
-
|
26
|
-
|
27
|
-
|
28
|
-
|
29
|
-
|
30
|
-
|
31
|
-
|
32
|
-
|
33
|
-
|
34
|
-
|
35
|
-
|
36
|
-
|
37
|
-
|
38
|
-
|
39
|
-
|
40
|
-
|
41
|
-
|
42
|
-
|
23
|
+
before :all do
|
24
|
+
@tester = AssemblyInfoTester.new
|
25
|
+
asm = AssemblyInfo.new
|
26
|
+
strio = StringIO.new
|
27
|
+
asm.log_device = strio
|
28
|
+
asm.log_level = :verbose
|
29
|
+
|
30
|
+
asm.version = @tester.version
|
31
|
+
|
32
|
+
@tester.build_and_read_assemblyinfo_file asm
|
33
|
+
@log_data = strio.string
|
34
|
+
end
|
35
|
+
|
36
|
+
it "should log the name of the output file" do
|
37
|
+
@log_data.should include(@tester.assemblyinfo_file)
|
38
|
+
end
|
39
|
+
|
40
|
+
it "should log the supplied attribute information" do
|
41
|
+
@log_data.should include("[assembly: AssemblyVersion(\"#{@tester.version}\")]")
|
42
|
+
end
|
43
43
|
end
|
44
44
|
|
45
45
|
describe AssemblyInfo, "when generating an assembly info file without an output file specified" do
|
46
|
-
|
47
|
-
|
48
|
-
|
49
|
-
|
50
|
-
|
51
|
-
|
52
|
-
|
53
|
-
|
54
|
-
|
55
|
-
|
56
|
-
|
57
|
-
|
58
|
-
|
59
|
-
|
60
|
-
end
|
61
|
-
|
62
|
-
describe AssemblyInfo, "when providing custom
|
63
|
-
|
64
|
-
|
65
|
-
|
66
|
-
|
67
|
-
|
68
|
-
|
69
|
-
|
70
|
-
|
71
|
-
|
72
|
-
|
73
|
-
|
74
|
-
|
75
|
-
|
76
|
-
|
77
|
-
|
78
|
-
|
79
|
-
|
80
|
-
|
81
|
-
|
82
|
-
|
83
|
-
|
84
|
-
|
85
|
-
|
86
|
-
|
87
|
-
|
88
|
-
|
89
|
-
|
90
|
-
|
91
|
-
|
46
|
+
before :all do
|
47
|
+
@tester = AssemblyInfoTester.new
|
48
|
+
asm = AssemblyInfo.new
|
49
|
+
strio = StringIO.new
|
50
|
+
asm.log_device = strio
|
51
|
+
|
52
|
+
asm.write
|
53
|
+
|
54
|
+
@log_data = strio.string
|
55
|
+
end
|
56
|
+
|
57
|
+
it "should log an error message saying the output file is required" do
|
58
|
+
@log_data.should include("output_file cannot be nil")
|
59
|
+
end
|
60
|
+
end
|
61
|
+
|
62
|
+
describe AssemblyInfo, "when providing a custom namespace without specifiying the language" do
|
63
|
+
before :all do
|
64
|
+
@tester = AssemblyInfoTester.new
|
65
|
+
asm = AssemblyInfo.new
|
66
|
+
|
67
|
+
asm.namespaces 'My.Name.Space'
|
68
|
+
|
69
|
+
@filedata = @tester.build_and_read_assemblyinfo_file asm
|
70
|
+
end
|
71
|
+
|
72
|
+
it "should default to c# for the generated assemby info" do
|
73
|
+
@filedata.should include("using My.Name.Space;")
|
74
|
+
end
|
75
|
+
end
|
76
|
+
|
77
|
+
describe AssemblyInfo, "when providing custom namespaces and specifying C#" do
|
78
|
+
before :all do
|
79
|
+
@tester = AssemblyInfoTester.new
|
80
|
+
@tester.lang_engine = CSharpEngine.new
|
81
|
+
asm = AssemblyInfo.new
|
82
|
+
asm.lang_engine = CSharpEngine.new
|
83
|
+
|
84
|
+
asm.namespaces 'My.Name.Space', 'Another.Namespace.GoesHere'
|
85
|
+
|
86
|
+
@filedata = @tester.build_and_read_assemblyinfo_file asm
|
87
|
+
end
|
88
|
+
|
89
|
+
it "should write the namespaces into the using statements" do
|
90
|
+
@filedata.should include("using My.Name.Space;")
|
91
|
+
@filedata.should include("using Another.Namespace.GoesHere;")
|
92
|
+
end
|
93
|
+
end
|
94
|
+
|
95
|
+
describe AssemblyInfo, "when providing custom namespaces and specifying VB.NET" do
|
96
|
+
before :all do
|
97
|
+
@tester = AssemblyInfoTester.new
|
98
|
+
@tester.lang_engine = VbNetEngine.new
|
99
|
+
asm = AssemblyInfo.new
|
100
|
+
asm.lang_engine = VbNetEngine.new
|
101
|
+
|
102
|
+
asm.namespaces 'My.Name.Space', 'Another.Namespace.GoesHere'
|
103
|
+
|
104
|
+
@filedata = @tester.build_and_read_assemblyinfo_file asm
|
105
|
+
end
|
106
|
+
|
107
|
+
it "should write the namespaces into the imports statements" do
|
108
|
+
@filedata.should include("Imports My.Name.Space")
|
109
|
+
@filedata.should include("Imports Another.Namespace.GoesHere")
|
110
|
+
end
|
111
|
+
end
|
112
|
+
|
113
|
+
describe AssemblyInfo, "when providing custom attributes without specifying a language" do
|
114
|
+
before :all do
|
115
|
+
@tester = AssemblyInfoTester.new
|
116
|
+
asm = AssemblyInfo.new
|
117
|
+
|
118
|
+
asm.custom_attributes :CustomAttribute => "custom attribute data", :AnotherAttribute => "more data here"
|
119
|
+
|
120
|
+
@filedata = @tester.build_and_read_assemblyinfo_file asm
|
121
|
+
end
|
122
|
+
|
123
|
+
it "should write the custom attributes to the assembly info file" do
|
124
|
+
@filedata.should include("[assembly: CustomAttribute(\"custom attribute data\")]")
|
125
|
+
@filedata.should include("[assembly: AnotherAttribute(\"more data here\")]")
|
126
|
+
end
|
127
|
+
end
|
128
|
+
|
129
|
+
describe AssemblyInfo, "when providing custom attributes and specifying C#" do
|
130
|
+
before :all do
|
131
|
+
@tester = AssemblyInfoTester.new
|
132
|
+
@tester.lang_engine = CSharpEngine.new
|
133
|
+
asm = AssemblyInfo.new
|
134
|
+
asm.lang_engine = CSharpEngine.new
|
135
|
+
|
136
|
+
asm.custom_attributes :CustomAttribute => "custom attribute data", :AnotherAttribute => "more data here"
|
137
|
+
|
138
|
+
@filedata = @tester.build_and_read_assemblyinfo_file asm
|
139
|
+
end
|
140
|
+
|
141
|
+
it "should write the custom attributes to the assembly info file" do
|
142
|
+
@filedata.should include("[assembly: CustomAttribute(\"custom attribute data\")]")
|
143
|
+
@filedata.should include("[assembly: AnotherAttribute(\"more data here\")]")
|
144
|
+
end
|
145
|
+
end
|
146
|
+
|
147
|
+
describe AssemblyInfo, "when providing custom attributes and specifying VB.NET" do
|
148
|
+
before :all do
|
149
|
+
@tester = AssemblyInfoTester.new
|
150
|
+
@tester.lang_engine = VbNetEngine.new
|
151
|
+
asm = AssemblyInfo.new
|
152
|
+
asm.lang_engine = VbNetEngine.new
|
153
|
+
|
154
|
+
asm.custom_attributes :CustomAttribute => "custom attribute data", :AnotherAttribute => "more data here"
|
155
|
+
|
156
|
+
@filedata = @tester.build_and_read_assemblyinfo_file asm
|
157
|
+
end
|
158
|
+
|
159
|
+
it "should write the custom attributes to the assembly info file" do
|
160
|
+
@filedata.should include("<assembly: CustomAttribute(\"custom attribute data\")>")
|
161
|
+
@filedata.should include("<assembly: AnotherAttribute(\"more data here\")>")
|
162
|
+
end
|
92
163
|
end
|
93
164
|
|
94
165
|
describe AssemblyInfo, "when specifying a custom attribute with no data" do
|
95
|
-
|
96
|
-
|
97
|
-
|
98
|
-
|
99
|
-
|
166
|
+
before :all do
|
167
|
+
@tester = AssemblyInfoTester.new
|
168
|
+
asm = AssemblyInfo.new
|
169
|
+
|
170
|
+
asm.custom_attributes :NoArgsAttribute => nil
|
100
171
|
|
101
|
-
|
102
|
-
|
103
|
-
|
104
|
-
|
105
|
-
|
106
|
-
|
172
|
+
@filedata = @tester.build_and_read_assemblyinfo_file asm
|
173
|
+
end
|
174
|
+
|
175
|
+
it "should write the attribute with an empty argument list" do
|
176
|
+
@filedata.should include("[assembly: NoArgsAttribute()]")
|
177
|
+
end
|
107
178
|
end
|
108
179
|
|
109
180
|
describe AssemblyInfo, "when specifying an attribute with non-string data" do
|
110
|
-
|
111
|
-
|
112
|
-
|
113
|
-
|
114
|
-
|
115
|
-
|
116
|
-
|
117
|
-
|
118
|
-
|
119
|
-
|
120
|
-
|
121
|
-
|
122
|
-
end
|
123
|
-
|
124
|
-
describe AssemblyInfo, "when generating an assembly info file with the built in attributes" do
|
125
|
-
|
126
|
-
|
127
|
-
|
128
|
-
|
129
|
-
|
130
|
-
|
131
|
-
|
132
|
-
|
133
|
-
|
134
|
-
|
135
|
-
|
136
|
-
|
137
|
-
|
138
|
-
|
139
|
-
|
140
|
-
|
141
|
-
|
142
|
-
|
143
|
-
|
144
|
-
|
145
|
-
|
146
|
-
|
147
|
-
|
148
|
-
|
149
|
-
|
150
|
-
|
151
|
-
|
152
|
-
|
153
|
-
|
154
|
-
|
155
|
-
|
156
|
-
|
157
|
-
|
158
|
-
|
159
|
-
|
160
|
-
|
161
|
-
|
162
|
-
|
163
|
-
|
164
|
-
|
165
|
-
|
166
|
-
|
167
|
-
|
168
|
-
|
169
|
-
|
170
|
-
|
171
|
-
|
172
|
-
|
173
|
-
|
174
|
-
|
175
|
-
|
176
|
-
|
177
|
-
|
178
|
-
|
179
|
-
|
180
|
-
|
181
|
-
|
182
|
-
|
183
|
-
|
184
|
-
|
185
|
-
|
186
|
-
|
181
|
+
before :all do
|
182
|
+
@tester = AssemblyInfoTester.new
|
183
|
+
asm = AssemblyInfo.new
|
184
|
+
|
185
|
+
asm.custom_attributes :NonStringAttribute => true
|
186
|
+
|
187
|
+
@filedata = @tester.build_and_read_assemblyinfo_file asm
|
188
|
+
end
|
189
|
+
|
190
|
+
it "should write the attribute data without quotes" do
|
191
|
+
@filedata.should include("[assembly: NonStringAttribute(true)]")
|
192
|
+
end
|
193
|
+
end
|
194
|
+
|
195
|
+
describe AssemblyInfo, "when generating an assembly info file with the built in attributes and no language specified" do
|
196
|
+
before :all do
|
197
|
+
@tester = AssemblyInfoTester.new
|
198
|
+
asm = AssemblyInfo.new
|
199
|
+
|
200
|
+
asm.company_name = @tester.company_name
|
201
|
+
asm.product_name = @tester.product_name
|
202
|
+
asm.version = @tester.version
|
203
|
+
asm.title = @tester.title
|
204
|
+
asm.description = @tester.description
|
205
|
+
asm.copyright = @tester.copyright
|
206
|
+
asm.com_visible = @tester.com_visible
|
207
|
+
asm.com_guid = @tester.com_guid
|
208
|
+
asm.file_version = @tester.file_version
|
209
|
+
asm.trademark = @tester.trademark
|
210
|
+
|
211
|
+
@filedata = @tester.build_and_read_assemblyinfo_file asm
|
212
|
+
end
|
213
|
+
|
214
|
+
it "should use the system.reflection namespace" do
|
215
|
+
@filedata.should include("using System.Reflection;")
|
216
|
+
end
|
217
|
+
|
218
|
+
it "should use the system.runtime.interopservices namespace" do
|
219
|
+
@filedata.should include("using System.Runtime.InteropServices;")
|
220
|
+
end
|
221
|
+
|
222
|
+
it "should contain the specified version information" do
|
223
|
+
@filedata.should include("[assembly: AssemblyVersion(\"#{@tester.version}\")]")
|
224
|
+
end
|
225
|
+
|
226
|
+
it "should contain the assembly title" do
|
227
|
+
@filedata.should include("[assembly: AssemblyTitle(\"#{@tester.title}\")]")
|
228
|
+
end
|
229
|
+
|
230
|
+
it "should contain the assembly description" do
|
231
|
+
@filedata.should include("[assembly: AssemblyDescription(\"#{@tester.description}\")]")
|
232
|
+
end
|
233
|
+
|
234
|
+
it "should contain the copyright information" do
|
235
|
+
@filedata.should include("[assembly: AssemblyCopyright(\"#{@tester.copyright}\")]")
|
236
|
+
end
|
237
|
+
|
238
|
+
it "should contain the com visible information" do
|
239
|
+
@filedata.should include("[assembly: ComVisible(#{@tester.com_visible})]")
|
240
|
+
@filedata.should include("[assembly: Guid(\"#{@tester.com_guid}\")]")
|
241
|
+
end
|
242
|
+
|
243
|
+
it "should contain the company name information" do
|
244
|
+
@filedata.should include("[assembly: AssemblyCompany(\"#{@tester.company_name}\")]")
|
245
|
+
end
|
246
|
+
|
247
|
+
it "should contain the product information" do
|
248
|
+
@filedata.should include("[assembly: AssemblyProduct(\"#{@tester.product_name}\")]")
|
249
|
+
end
|
250
|
+
|
251
|
+
it "should contain the file version information" do
|
252
|
+
@filedata.should include("[assembly: AssemblyFileVersion(\"#{@tester.file_version}\")]")
|
253
|
+
end
|
254
|
+
|
255
|
+
it "should contain the trademark information" do
|
256
|
+
@filedata.should include("[assembly: AssemblyTrademark(\"#{@tester.trademark}\")]")
|
257
|
+
end
|
258
|
+
end
|
259
|
+
|
260
|
+
describe AssemblyInfo, "when generating an assembly info file with the built in attributes and C# specified" do
|
261
|
+
before :all do
|
262
|
+
@tester = AssemblyInfoTester.new
|
263
|
+
@tester.lang_engine = CSharpEngine.new
|
264
|
+
asm = AssemblyInfo.new
|
265
|
+
asm.lang_engine = CSharpEngine.new
|
266
|
+
|
267
|
+
asm.company_name = @tester.company_name
|
268
|
+
asm.product_name = @tester.product_name
|
269
|
+
asm.version = @tester.version
|
270
|
+
asm.title = @tester.title
|
271
|
+
asm.description = @tester.description
|
272
|
+
asm.copyright = @tester.copyright
|
273
|
+
asm.com_visible = @tester.com_visible
|
274
|
+
asm.com_guid = @tester.com_guid
|
275
|
+
asm.file_version = @tester.file_version
|
276
|
+
asm.trademark = @tester.trademark
|
277
|
+
|
278
|
+
@filedata = @tester.build_and_read_assemblyinfo_file asm
|
279
|
+
end
|
280
|
+
|
281
|
+
it "should use the system.reflection namespace" do
|
282
|
+
@filedata.should include("using System.Reflection;")
|
283
|
+
end
|
284
|
+
|
285
|
+
it "should use the system.runtime.interopservices namespace" do
|
286
|
+
@filedata.should include("using System.Runtime.InteropServices;")
|
287
|
+
end
|
288
|
+
|
289
|
+
it "should contain the specified version information" do
|
290
|
+
@filedata.should include("[assembly: AssemblyVersion(\"#{@tester.version}\")]")
|
291
|
+
end
|
292
|
+
|
293
|
+
it "should contain the assembly title" do
|
294
|
+
@filedata.should include("[assembly: AssemblyTitle(\"#{@tester.title}\")]")
|
295
|
+
end
|
296
|
+
|
297
|
+
it "should contain the assembly description" do
|
298
|
+
@filedata.should include("[assembly: AssemblyDescription(\"#{@tester.description}\")]")
|
299
|
+
end
|
300
|
+
|
301
|
+
it "should contain the copyright information" do
|
302
|
+
@filedata.should include("[assembly: AssemblyCopyright(\"#{@tester.copyright}\")]")
|
303
|
+
end
|
304
|
+
|
305
|
+
it "should contain the com visible information" do
|
306
|
+
@filedata.should include("[assembly: ComVisible(#{@tester.com_visible})]")
|
307
|
+
@filedata.should include("[assembly: Guid(\"#{@tester.com_guid}\")]")
|
308
|
+
end
|
309
|
+
|
310
|
+
it "should contain the company name information" do
|
311
|
+
@filedata.should include("[assembly: AssemblyCompany(\"#{@tester.company_name}\")]")
|
312
|
+
end
|
313
|
+
|
314
|
+
it "should contain the product information" do
|
315
|
+
@filedata.should include("[assembly: AssemblyProduct(\"#{@tester.product_name}\")]")
|
316
|
+
end
|
317
|
+
|
318
|
+
it "should contain the file version information" do
|
319
|
+
@filedata.should include("[assembly: AssemblyFileVersion(\"#{@tester.file_version}\")]")
|
320
|
+
end
|
321
|
+
|
322
|
+
it "should contain the trademark information" do
|
323
|
+
@filedata.should include("[assembly: AssemblyTrademark(\"#{@tester.trademark}\")]")
|
324
|
+
end
|
325
|
+
end
|
326
|
+
|
327
|
+
describe AssemblyInfo, "when generating an assembly info file with the built in attributes and VB.NET specified" do
|
328
|
+
before :all do
|
329
|
+
@tester = AssemblyInfoTester.new
|
330
|
+
@tester.lang_engine = VbNetEngine.new
|
331
|
+
asm = AssemblyInfo.new
|
332
|
+
asm.lang_engine = VbNetEngine.new
|
333
|
+
|
334
|
+
asm.company_name = @tester.company_name
|
335
|
+
asm.product_name = @tester.product_name
|
336
|
+
asm.version = @tester.version
|
337
|
+
asm.title = @tester.title
|
338
|
+
asm.description = @tester.description
|
339
|
+
asm.copyright = @tester.copyright
|
340
|
+
asm.com_visible = @tester.com_visible
|
341
|
+
asm.com_guid = @tester.com_guid
|
342
|
+
asm.file_version = @tester.file_version
|
343
|
+
asm.trademark = @tester.trademark
|
344
|
+
|
345
|
+
@filedata = @tester.build_and_read_assemblyinfo_file asm
|
346
|
+
end
|
347
|
+
|
348
|
+
it "should use the system.reflection namespace" do
|
349
|
+
@filedata.should include("Imports System.Reflection")
|
350
|
+
end
|
351
|
+
|
352
|
+
it "should use the system.runtime.interopservices namespace" do
|
353
|
+
@filedata.should include("Imports System.Runtime.InteropServices")
|
354
|
+
end
|
355
|
+
|
356
|
+
it "should contain the specified version information" do
|
357
|
+
@filedata.should include("<assembly: AssemblyVersion(\"#{@tester.version}\")>")
|
358
|
+
end
|
359
|
+
|
360
|
+
it "should contain the assembly title" do
|
361
|
+
@filedata.should include("<assembly: AssemblyTitle(\"#{@tester.title}\")>")
|
362
|
+
end
|
363
|
+
|
364
|
+
it "should contain the assembly description" do
|
365
|
+
@filedata.should include("<assembly: AssemblyDescription(\"#{@tester.description}\")>")
|
366
|
+
end
|
367
|
+
|
368
|
+
it "should contain the copyright information" do
|
369
|
+
@filedata.should include("<assembly: AssemblyCopyright(\"#{@tester.copyright}\")>")
|
370
|
+
end
|
371
|
+
|
372
|
+
it "should contain the com visible information" do
|
373
|
+
@filedata.should include("<assembly: ComVisible(#{@tester.com_visible})>")
|
374
|
+
@filedata.should include("<assembly: Guid(\"#{@tester.com_guid}\")>")
|
375
|
+
end
|
376
|
+
|
377
|
+
it "should contain the company name information" do
|
378
|
+
@filedata.should include("<assembly: AssemblyCompany(\"#{@tester.company_name}\")>")
|
379
|
+
end
|
380
|
+
|
381
|
+
it "should contain the product information" do
|
382
|
+
@filedata.should include("<assembly: AssemblyProduct(\"#{@tester.product_name}\")>")
|
383
|
+
end
|
384
|
+
|
385
|
+
it "should contain the file version information" do
|
386
|
+
@filedata.should include("<assembly: AssemblyFileVersion(\"#{@tester.file_version}\")>")
|
387
|
+
end
|
388
|
+
|
389
|
+
it "should contain the trademark information" do
|
390
|
+
@filedata.should include("<assembly: AssemblyTrademark(\"#{@tester.trademark}\")>")
|
391
|
+
end
|
187
392
|
end
|
188
393
|
|
189
394
|
describe AssemblyInfo, "when generating an assembly info file with no attributes provided" do
|
190
|
-
|
191
|
-
|
192
|
-
|
193
|
-
|
194
|
-
|
195
|
-
|
196
|
-
|
197
|
-
|
198
|
-
|
199
|
-
|
200
|
-
|
201
|
-
|
202
|
-
|
203
|
-
|
204
|
-
|
205
|
-
|
206
|
-
|
207
|
-
|
208
|
-
|
209
|
-
|
210
|
-
|
211
|
-
|
212
|
-
|
213
|
-
|
214
|
-
|
215
|
-
|
216
|
-
|
217
|
-
|
218
|
-
|
219
|
-
|
220
|
-
|
221
|
-
|
222
|
-
|
223
|
-
|
224
|
-
|
225
|
-
|
226
|
-
|
227
|
-
|
228
|
-
|
229
|
-
|
230
|
-
|
231
|
-
|
232
|
-
|
395
|
+
before :all do
|
396
|
+
@tester = AssemblyInfoTester.new
|
397
|
+
asm = AssemblyInfo.new
|
398
|
+
|
399
|
+
@filedata = @tester.build_and_read_assemblyinfo_file asm
|
400
|
+
end
|
401
|
+
|
402
|
+
it "should not contain the specified version information" do
|
403
|
+
@filedata.should_not include("[assembly: AssemblyVersion(\"#{@tester.version}\")]")
|
404
|
+
end
|
405
|
+
|
406
|
+
it "should not contain the assembly title" do
|
407
|
+
@filedata.should_not include("[assembly: AssemblyTitle(\"#{@tester.title}\")]")
|
408
|
+
end
|
409
|
+
|
410
|
+
it "should not contain the assembly description" do
|
411
|
+
@filedata.should_not include("[assembly: AssemblyDescription(\"#{@tester.description}\")]")
|
412
|
+
end
|
413
|
+
|
414
|
+
it "should not contain the copyright information" do
|
415
|
+
@filedata.should_not include("[assembly: AssemblyCopyright(\"#{@tester.copyright}\")]")
|
416
|
+
end
|
417
|
+
|
418
|
+
it "should not contain the com visible information" do
|
419
|
+
@filedata.should_not include("[assembly: ComVisible(#{@tester.com_visible})]")
|
420
|
+
@filedata.should_not include("[assembly: Guid(\"#{@tester.com_guid}\")]")
|
421
|
+
end
|
422
|
+
|
423
|
+
it "should not contain the company name information" do
|
424
|
+
@filedata.should_not include("[assembly: AssemblyCompany(\"#{@tester.company_name}\")]")
|
425
|
+
end
|
426
|
+
|
427
|
+
it "should not contain the product information" do
|
428
|
+
@filedata.should_not include("[assembly: AssemblyProduct(\"#{@tester.product_name}\")]")
|
429
|
+
end
|
430
|
+
|
431
|
+
it "should not contain the file version information" do
|
432
|
+
@filedata.should_not include("[assembly: AssemblyFileVersion(\"#{@tester.file_version}\")]")
|
433
|
+
end
|
434
|
+
|
435
|
+
it "should not contain the trademark information" do
|
436
|
+
@filedata.should_not include("[assembly: AssemblyTrademark(\"#{@tester.trademark}\")]")
|
437
|
+
end
|
233
438
|
end
|
234
439
|
|
235
440
|
describe AssemblyInfo, "when configuring the assembly info generator with a yaml file" do
|
236
|
-
|
237
|
-
|
238
|
-
|
239
|
-
|
240
|
-
|
241
|
-
|
242
|
-
|
243
|
-
|
244
|
-
|
245
|
-
|
441
|
+
before :all do
|
442
|
+
tester = AssemblyInfoTester.new
|
443
|
+
@asm = AssemblyInfo.new
|
444
|
+
@asm.configure(tester.yaml_file)
|
445
|
+
end
|
446
|
+
|
447
|
+
it "should set the values for the provided attributes" do
|
448
|
+
@asm.version.should == "0.0.1"
|
449
|
+
@asm.company_name.should == "some company name"
|
450
|
+
end
|
246
451
|
end
|