albacore 0.2.6 → 0.2.7

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.
Files changed (46) hide show
  1. data/Gemfile +7 -7
  2. data/README.markdown +0 -33
  3. data/VERSION +1 -1
  4. metadata +84 -91
  5. data/spec/albacoremodel_spec.rb +0 -53
  6. data/spec/assemblyinfo_spec.rb +0 -541
  7. data/spec/attrmethods_spec.rb +0 -136
  8. data/spec/config_spec.rb +0 -34
  9. data/spec/createtask_spec.rb +0 -236
  10. data/spec/csc_spec.rb +0 -253
  11. data/spec/docu_spec.rb +0 -109
  12. data/spec/exec_spec.rb +0 -45
  13. data/spec/fluentmigratorrunner_spec.rb +0 -254
  14. data/spec/msbuild_spec.rb +0 -215
  15. data/spec/mspec_spec.rb +0 -28
  16. data/spec/mstesttestrunner_spec.rb +0 -142
  17. data/spec/nant_spec.rb +0 -110
  18. data/spec/nchurn_spec.rb +0 -75
  19. data/spec/ncoverconsole_spec.rb +0 -353
  20. data/spec/ncoverreport_spec.rb +0 -619
  21. data/spec/ndepend_spec.rb +0 -72
  22. data/spec/nunittestrunner_spec.rb +0 -122
  23. data/spec/nuspec_spec.rb +0 -78
  24. data/spec/output_spec.rb +0 -117
  25. data/spec/patches/docu_patch.rb +0 -13
  26. data/spec/patches/fail_patch.rb +0 -9
  27. data/spec/patches/system_patch.rb +0 -20
  28. data/spec/plink_spec.rb +0 -62
  29. data/spec/runcommand_spec.rb +0 -94
  30. data/spec/spec_helper.rb +0 -17
  31. data/spec/specflowreport_spec.rb +0 -146
  32. data/spec/sqlcmd_spec.rb +0 -334
  33. data/spec/support/assemblyinfotester.rb +0 -51
  34. data/spec/support/ironruby_validator.rb +0 -26
  35. data/spec/support/msbuildtestdata.rb +0 -32
  36. data/spec/support/nanttestdata.rb +0 -33
  37. data/spec/support/ncoverconsoletestdata.rb +0 -20
  38. data/spec/support/ncoverreporttestdata.rb +0 -26
  39. data/spec/support/nokogiri_validator.rb +0 -15
  40. data/spec/support/outputtestdata.rb +0 -13
  41. data/spec/support/ziptestdata.rb +0 -13
  42. data/spec/unzip_spec.rb +0 -15
  43. data/spec/xbuild_spec.rb +0 -15
  44. data/spec/xunit_spec.rb +0 -168
  45. data/spec/yamlconfig_spec.rb +0 -49
  46. data/spec/zip_spec.rb +0 -104
@@ -1,28 +0,0 @@
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,142 +0,0 @@
1
- require 'spec_helper'
2
- require 'albacore/mstesttestrunner'
3
-
4
- shared_examples_for "mstest paths" do
5
- before :all do
6
- @mstestpath = File.join(File.dirname(__FILE__), 'support', 'Tools', 'MSTest-2008', 'mstest.exe')
7
- @test_assembly = File.join(File.expand_path(File.dirname(__FILE__)), 'support', 'CodeCoverage', 'mstest', 'TestSolution.MSTestTests.dll')
8
- @test_option = "/test:Test"
9
- end
10
- end
11
-
12
- describe MSTestTestRunner, "the command parameters for an mstest runner" do
13
- it_should_behave_like "mstest paths"
14
-
15
- before :all do
16
- mstest = MSTestTestRunner.new(@mstestpath)
17
- mstest.assemblies @test_assembly
18
- mstest.options @test_option
19
- mstest.tests 'APassingTest', 'AFailingTest'
20
-
21
- @command_parameters = mstest.get_command_parameters
22
- end
23
-
24
- it "should not include the path to the command" do
25
- @command_parameters.should_not include(@mstestpath)
26
- end
27
-
28
- it "should include the list of assemblies" do
29
- @command_parameters.should include("/testcontainer:\"#{@test_assembly}\"")
30
- end
31
-
32
- it "should include the specific set of tests" do
33
- @command_parameters.should include("/test:APassingTest /test:AFailingTest")
34
- end
35
-
36
- it "should include the list of options" do
37
- @command_parameters.should include(@test_option)
38
- end
39
- end
40
-
41
- describe MSTestTestRunner, "the command line string for an mstest runner" do
42
- it_should_behave_like "mstest paths"
43
-
44
- before :all do
45
- mstest = MSTestTestRunner.new(@mstestpath)
46
- mstest.assemblies @test_assembly
47
-
48
- @command_line = mstest.get_command_line
49
- @command_parameters = mstest.get_command_parameters.join(" ")
50
- end
51
-
52
- it "should start with the path to the command" do
53
- @command_line.split(" ").first.should == @mstestpath
54
- end
55
-
56
- it "should include the command parameters" do
57
- @command_line.should include(@command_parameters)
58
- end
59
- end
60
-
61
-
62
- describe MSTestTestRunner, "when configured correctly" do
63
- it_should_behave_like "mstest paths"
64
-
65
- before :all do
66
- mstest = MSTestTestRunner.new(@mstestpath)
67
- mstest.extend(FailPatch)
68
- mstest.assemblies @test_assembly
69
- mstest.log_level = :verbose
70
- mstest.tests "APassingTest"
71
- mstest.execute
72
- end
73
-
74
- it "should execute" do
75
- $task_failed.should be_false
76
- end
77
- end
78
-
79
- describe MSTestTestRunner, "when configured correctly, but a test fails" do
80
- it_should_behave_like "mstest paths"
81
-
82
- before :all do
83
- mstest = MSTestTestRunner.new(@mstestpath)
84
- mstest.extend(FailPatch)
85
- mstest.assemblies @test_assembly
86
- mstest.log_level = :verbose
87
- mstest.tests "AFailingTest"
88
- mstest.execute
89
- end
90
-
91
- it "should fail" do
92
- $task_failed.should be_true
93
- end
94
- end
95
-
96
- describe MSTestTestRunner, "when using the configuration command and not providing a command in the intializer" do
97
- it_should_behave_like "mstest paths"
98
-
99
- before :all do
100
- Albacore.configure do |config|
101
- config.mstest.command = "configured command"
102
- end
103
- @mstest = MSTestTestRunner.new
104
- end
105
-
106
- it "should use the configuration command" do
107
- @mstest.command.should == "configured command"
108
- end
109
- end
110
-
111
- describe MSTestTestRunner, "when the command has been set through configuration and providing a command in the intializer" do
112
- it_should_behave_like "mstest paths"
113
-
114
- before :all do
115
- Albacore.configure do |config|
116
- config.mstest.command = "configured command"
117
- end
118
- @mstest = MSTestTestRunner.new("initializer command")
119
- end
120
-
121
- it "should use the initializer command" do
122
- @mstest.command.should == "initializer command"
123
- end
124
- end
125
-
126
- describe MSTestTestRunner, "when configuration has been provided" do
127
- before :all do
128
- Albacore.configure do |config|
129
- config.mstest do |mstest|
130
- mstest.assemblies = ["foo.dll", "bar.dll"]
131
- mstest.options = ["/test"]
132
- end
133
- end
134
-
135
- @mstest = MSTestTestRunner.new
136
- end
137
-
138
- it "should use the provided configuration" do
139
- @mstest.assemblies.should == ["foo.dll", "bar.dll"]
140
- @mstest.options.should == ["/test"]
141
- end
142
- end
@@ -1,110 +0,0 @@
1
- require 'spec_helper'
2
- require 'albacore/nant'
3
- require 'nanttestdata'
4
-
5
- shared_examples_for "prepping nant" do
6
- before :all do
7
- @testdata = NAntTestData.new
8
- @nant = @testdata.nant
9
- @strio = StringIO.new
10
- @nant.log_device = @strio
11
- end
12
-
13
- after :all do
14
- @testdata.clean_output
15
- end
16
- end
17
-
18
- describe NAnt, "when a nant path is not specified" do
19
- it_should_behave_like "prepping nant"
20
-
21
- before :all do
22
- @nant.extend(FailPatch)
23
- @log_data = @strio.string
24
- @nant.execute
25
- end
26
-
27
- it "should fail" do
28
- $task_failed.should == true
29
- end
30
- end
31
-
32
- describe NAnt, "when running a nant build file" do
33
- it_should_behave_like "prepping nant"
34
-
35
- before :all do
36
- @nant.command = @testdata.nant_path
37
- @nant.build_file = @testdata.build_file_path
38
- @nant.execute
39
- end
40
-
41
- it "should execute the default task" do
42
- File.exists?("#{@testdata.output_path}/buildfile.txt").should be_true
43
- end
44
- end
45
-
46
- describe NAnt, "when running specific targets" do
47
- it_should_behave_like "prepping nant"
48
-
49
- before :all do
50
- @nant.command = @testdata.nant_path
51
- @nant.build_file = @testdata.build_file_path
52
- @nant.targets :build, :other
53
- @nant.execute
54
- end
55
-
56
- it "should execute the first task" do
57
- File.exists?("#{@testdata.output_path}/buildfile.txt").should be_true
58
- end
59
-
60
- it "should execute the second task" do
61
- File.exists?("#{@testdata.output_path}/otherfile.txt").should be_true
62
- end
63
- end
64
-
65
- describe NAnt, "when specifying multiple configuration properties" do
66
-
67
- before :all do
68
- @testdata = NAntTestData.new(:fast,"1.2.3")
69
- @nant = @testdata.nant
70
- @strio = StringIO.new
71
- @nant.log_device = @strio
72
- @nant.command = @testdata.nant_path
73
- @nant.build_file = @testdata.build_file_path
74
-
75
- @nant.properties :version => "1.2.3", "build.mode" => :fast, :debug => false
76
- @nant.execute
77
- end
78
-
79
- it "should spedify the first property" do
80
- @nant.system_command.should include("-D:version=1.2.3")
81
- end
82
-
83
- it "should spedify the second property" do
84
- @nant.system_command.should include("-D:build.mode=fast")
85
- end
86
-
87
- it "should spedify the last property" do
88
- @nant.system_command.should include("-D:debug=false")
89
- end
90
-
91
- it "should create the output file" do
92
- File.exists?("#{@testdata.output_path}/buildfile.txt").should be_true
93
- end
94
-
95
- after :all do
96
- @testdata.clean_output
97
- end
98
- end
99
-
100
- describe NAnt, "when providing configuration for nant" do
101
- let :nant do
102
- Albacore.configure do |config|
103
- config.nant.command = "configured"
104
- end
105
- nant = NAnt.new
106
- end
107
- it "should use the configured value" do
108
- nant.command.should == "configured"
109
- end
110
- end
@@ -1,75 +0,0 @@
1
- require 'spec_helper'
2
- require 'albacore/nchurn'
3
- require 'patches/system_patch'
4
-
5
- class NChurn
6
- attr_accessor :failure_message
7
-
8
- def fail_with_message(m)
9
- @failure_message = m
10
- end
11
- end
12
-
13
- class NChurnTestData
14
- attr_reader :nchurn_command
15
- attr_reader :output_text
16
- def initialize
17
- @nchurn_command = File.join(File.dirname(__FILE__), 'support', 'Tools', 'NChurn-v0.4', 'nchurn.exe')
18
- @output_text = 'nchurn-test.txt'
19
-
20
- end
21
-
22
- def remove!
23
- FileUtils.rm @output_text if File.exist? @output_text
24
- end
25
- end
26
-
27
- describe NChurn, "when running nchurn" do
28
- before :all do
29
- @nchurn = NChurn.new
30
- @nchurn.extend SystemPatch
31
- @test_data = NChurnTestData.new
32
- @test_data.remove!
33
-
34
- end
35
-
36
- before :each do
37
- @nchurn.failure_message = nil
38
- end
39
-
40
- it "should fail with no command" do
41
- @nchurn.execute
42
- @nchurn.failure_message.should eql('Churn Analysis Failed. See Build Log For Detail.')
43
- end
44
-
45
- it "should succeed and redirect to file" do
46
- @nchurn.command = NChurnTestData.new.nchurn_command
47
- @nchurn.output @test_data.output_text
48
-
49
- @nchurn.execute
50
- @nchurn.failure_message.should be_nil
51
- File.exist?(@test_data.output_text).should be_true
52
- end
53
-
54
- it "should pass all parameters correctly" do
55
- @nchurn.command = "nchurn.exe"
56
- @nchurn.disable_system = true
57
- @nchurn.output @test_data.output_text
58
- @nchurn.input "file.txt"
59
-
60
- @nchurn.churn_precent 30
61
- @nchurn.top 10
62
- @nchurn.report_as :xml
63
- @nchurn.env_path 'c:/tools'
64
- @nchurn.adapter :git
65
- @nchurn.exclude "exe"
66
- @nchurn.include "foo"
67
-
68
- @nchurn.execute
69
- @nchurn.failure_message.should be_nil
70
- cmd = %{"nchurn.exe" -i "file.txt" -c 0.3 -t 10 -r xml -p "c:/tools" -a git -x "exe" -n "foo" > "nchurn-test.txt"}
71
- @nchurn.system_command.should eql(cmd)
72
- end
73
-
74
- end
75
-
@@ -1,353 +0,0 @@
1
- require 'spec_helper'
2
- require 'albacore/ncoverconsole'
3
- require 'albacore/nunittestrunner'
4
- require 'albacore/mspectestrunner'
5
- require 'ncoverconsoletestdata'
6
-
7
- describe NCoverConsole, "when specifying assemblies to cover" do
8
- before :all do
9
- @testdata = NCoverConsoleTestData.new
10
- File.delete(@testdata.xml_coverage_output) if File.exist?(@testdata.xml_coverage_output)
11
-
12
- @ncc = NCoverConsole.new()
13
-
14
- @ncc.extend(SystemPatch)
15
- @ncc.log_level = :verbose
16
- @ncc.command = @testdata.ncoverpath
17
- @ncc.output :xml => @testdata.xml_coverage_output
18
- @ncc.working_directory = @testdata.working_directory
19
- @ncc.cover_assemblies "TestSolution"
20
-
21
- nunit = NUnitTestRunner.new(@testdata.nunitpath)
22
- nunit.assemblies @testdata.test_assembly
23
- nunit.options '/noshadow'
24
-
25
- @ncc.testrunner = nunit
26
- @ncc.execute
27
- end
28
-
29
- it "should provide coverage for the specified assemblies" do
30
- @ncc.system_command.should include("//assemblies \"TestSolution\"")
31
- end
32
- end
33
-
34
- describe NCoverConsole, "when specifying assemblies with spaces in the name" do
35
- before :all do
36
- @testdata = NCoverConsoleTestData.new
37
- File.delete(@testdata.xml_coverage_output) if File.exist?(@testdata.xml_coverage_output)
38
-
39
- @ncc = NCoverConsole.new()
40
-
41
- @ncc.extend(SystemPatch)
42
- @ncc.log_level = :verbose
43
- @ncc.command = @testdata.ncoverpath
44
- @ncc.output :xml => @testdata.xml_coverage_output
45
- @ncc.working_directory = @testdata.working_directory
46
- @ncc.cover_assemblies "assemblies/with spaces/TestSolution"
47
-
48
- nunit = NUnitTestRunner.new(@testdata.nunitpath)
49
- nunit.assemblies @testdata.test_assembly_with_spaces
50
- nunit.options '/noshadow'
51
-
52
- @ncc.testrunner = nunit
53
- @ncc.execute
54
- end
55
-
56
- it "should provide coverage for the specified assemblies" do
57
- @ncc.system_command.should include("//assemblies \"assemblies/with spaces/TestSolution\"")
58
- end
59
-
60
- end
61
-
62
- describe NCoverConsole, "when specifying assemblies to ignore" do
63
- before :all do
64
- @testdata = NCoverConsoleTestData.new
65
- File.delete(@testdata.xml_coverage_output) if File.exist?(@testdata.xml_coverage_output)
66
-
67
- @ncc = NCoverConsole.new()
68
-
69
- @ncc.extend(SystemPatch)
70
- @ncc.log_level = :verbose
71
- @ncc.command = @testdata.ncoverpath
72
- @ncc.output :xml => @testdata.xml_coverage_output
73
- @ncc.working_directory = @testdata.working_directory
74
- @ncc.exclude_assemblies "TestSolution.*"
75
-
76
- nunit = NUnitTestRunner.new(@testdata.nunitpath)
77
- nunit.assemblies @testdata.test_assembly
78
- nunit.options '/noshadow'
79
-
80
- @ncc.testrunner = nunit
81
- @ncc.execute
82
- end
83
-
84
- it "should provide coverage for the specified assemblies" do
85
- @ncc.system_command.should include("//exclude-assemblies \"TestSolution.*\"")
86
- end
87
- end
88
-
89
- describe NCoverConsole, "when specifying attributes to exclude" do
90
- before :all do
91
- @testdata = NCoverConsoleTestData.new
92
- File.delete(@testdata.xml_coverage_output) if File.exist?(@testdata.xml_coverage_output)
93
-
94
- @ncc = NCoverConsole.new()
95
-
96
- @ncc.extend(SystemPatch)
97
- @ncc.log_level = :verbose
98
- @ncc.command = @testdata.ncoverpath
99
- @ncc.output :xml => @testdata.xml_coverage_output
100
- @ncc.working_directory = @testdata.working_directory
101
- @ncc.exclude_attributes "excludeme", "excludeme_too"
102
-
103
- nunit = NUnitTestRunner.new(@testdata.nunitpath)
104
- nunit.assemblies @testdata.test_assembly
105
- nunit.options '/noshadow'
106
-
107
- @ncc.testrunner = nunit
108
- @ncc.execute
109
- end
110
-
111
- it "should not provide coverage for the excluded attributes" do
112
- @ncc.system_command.should include("//exclude-attributes \"excludeme\";\"excludeme_too\"")
113
- end
114
- end
115
-
116
- describe NCoverConsole, "when running with the defaults" do
117
- before :all do
118
- @testdata = NCoverConsoleTestData.new
119
- @ncc = NCoverConsole.new
120
-
121
- @ncc.extend(SystemPatch)
122
- @ncc.extend(FailPatch)
123
-
124
- @ncc.command = @testdata.ncoverpath
125
- @ncc.testrunner = NUnitTestRunner.new
126
-
127
- @ncc.execute
128
- end
129
-
130
- it "should include the register flag in the command" do
131
- @ncc.system_command.should include("//reg")
132
- end
133
- end
134
-
135
- describe NCoverConsole, "when opting out of registering the ncover dll" do
136
- before :all do
137
- @testdata = NCoverConsoleTestData.new
138
- @ncc = NCoverConsole.new
139
-
140
- @ncc.extend(SystemPatch)
141
- @ncc.extend(FailPatch)
142
-
143
- @ncc.command = @testdata.ncoverpath
144
- @ncc.no_registration
145
- @ncc.testrunner = NUnitTestRunner.new
146
-
147
- @ncc.execute
148
- end
149
-
150
- it "should not include the register flag in the command" do
151
- @ncc.system_command.should_not include("//reg")
152
- end
153
- end
154
-
155
- describe NCoverConsole, "when specifying the types of coverage to analyze" do
156
- before :all do
157
- @testdata = NCoverConsoleTestData.new
158
- File.delete(@testdata.xml_coverage_output) if File.exist?(@testdata.xml_coverage_output)
159
-
160
- @ncc = NCoverConsole.new()
161
-
162
- @ncc.extend(SystemPatch)
163
- @ncc.log_level = :verbose
164
- @ncc.command = @testdata.ncoverpath
165
- @ncc.output :xml => @testdata.xml_coverage_output
166
- @ncc.working_directory = @testdata.working_directory
167
- @ncc.coverage :Symbol, :Branch, :MethodVisits, :CyclomaticComplexity
168
-
169
- nunit = NUnitTestRunner.new(@testdata.nunitpath)
170
- nunit.assemblies @testdata.test_assembly
171
- nunit.options '/noshadow'
172
-
173
- @ncc.testrunner = nunit
174
- @ncc.execute
175
- end
176
-
177
- it "should only run coverage for those metrics" do
178
- @ncc.system_command.should include("//coverage-type \"Symbol, Branch, MethodVisits, CyclomaticComplexity\"")
179
- end
180
- end
181
-
182
- describe NCoverConsole, "when analyzing a test suite with failing tests" do
183
- before :all do
184
- @testdata = NCoverConsoleTestData.new
185
- File.delete(@testdata.xml_coverage_output) if File.exist?(@testdata.xml_coverage_output)
186
-
187
- ncc = NCoverConsole.new()
188
- strio = StringIO.new
189
- ncc.log_device = strio
190
-
191
- ncc.extend(SystemPatch)
192
- ncc.extend(FailPatch)
193
-
194
- ncc.log_level = :verbose
195
- ncc.command = @testdata.ncoverpath
196
- ncc.output :xml => @testdata.xml_coverage_output
197
- ncc.working_directory = @testdata.working_directory
198
-
199
- nunit = NUnitTestRunner.new(@testdata.nunitpath)
200
- nunit.assemblies @testdata.failing_test_assembly
201
- nunit.options '/noshadow'
202
-
203
- ncc.testrunner = nunit
204
-
205
- ncc.execute
206
- @log_data = strio.string
207
- end
208
-
209
- it "should return a failure code" do
210
- $task_failed.should == true
211
- end
212
-
213
- it "should log a failure message" do
214
- @log_data.should include("Code Coverage Analysis Failed. See Build Log For Detail.")
215
- end
216
- end
217
-
218
- describe NCoverConsole, "when running without a testrunner" do
219
- before :all do
220
- @testdata = NCoverConsoleTestData.new
221
- ncc = NCoverConsole.new()
222
- ncc.extend(FailPatch)
223
- strio = StringIO.new
224
- ncc.log_device = strio
225
-
226
- ncc.execute
227
- @log_data = strio.string
228
- end
229
-
230
- it "should log a message saying the test runner is required" do
231
- @log_data.should include("testrunner cannot be nil.")
232
- end
233
-
234
- it "should fail the task" do
235
- $task_failed.should be_true
236
- end
237
- end
238
-
239
- describe NCoverConsole, "when producing an xml coverage report with nunit" do
240
- before :all do
241
- @testdata = NCoverConsoleTestData.new
242
- File.delete(@testdata.xml_coverage_output) if File.exist?(@testdata.xml_coverage_output)
243
-
244
- @ncc = NCoverConsole.new()
245
-
246
- @ncc.extend(SystemPatch)
247
- @ncc.log_level = :verbose
248
- @ncc.command = @testdata.ncoverpath
249
- @ncc.output :xml => @testdata.xml_coverage_output
250
- @ncc.working_directory = @testdata.working_directory
251
-
252
- nunit = NUnitTestRunner.new(@testdata.nunitpath)
253
- nunit.assemblies @testdata.test_assembly
254
- nunit.options '/noshadow'
255
-
256
- @ncc.testrunner = nunit
257
- @ncc.execute
258
- end
259
-
260
- it "should execute ncover.console from the specified path" do
261
- @ncc.system_command.should include(File.expand_path(@testdata.ncoverpath))
262
- end
263
-
264
- it "should execute the test runner from the specified path" do
265
- @ncc.system_command.downcase.should include(@testdata.nunitpath.downcase)
266
- end
267
-
268
- it "should pass the specified assembly to the test runner" do
269
- @ncc.system_command.should include("TestSolution.Tests.dll")
270
- end
271
-
272
- it "should tell nunit to use the noshadow option" do
273
- @ncc.system_command.should include("/noshadow")
274
- end
275
-
276
- it "should write the coverage data to the specified file" do
277
- File.exist?(@testdata.xml_coverage_output).should == true
278
- end
279
- end
280
-
281
- describe NCoverConsole, "when specifying an html report and an xml coverage report with nunit" do
282
- before :all do
283
- @testdata = NCoverConsoleTestData.new
284
- File.delete(@testdata.xml_coverage_output) if File.exist?(@testdata.xml_coverage_output)
285
- File.delete(@testdata.html_coverage_output) if File.exist?(@testdata.html_coverage_output)
286
-
287
- ncc = NCoverConsole.new()
288
-
289
- ncc.extend(SystemPatch)
290
- ncc.log_level = :verbose
291
- ncc.command = @testdata.ncoverpath
292
- ncc.output :xml => @testdata.xml_coverage_output, :html => @testdata.html_coverage_output
293
- ncc.working_directory = @testdata.working_directory
294
-
295
- nunit = NUnitTestRunner.new(@testdata.nunitpath)
296
- nunit.assemblies @testdata.test_assembly
297
- nunit.options '/noshadow'
298
-
299
- ncc.testrunner = nunit
300
- ncc.execute
301
- end
302
-
303
- it "should produce the xml report" do
304
- File.exist?(@testdata.xml_coverage_output).should == true
305
- end
306
-
307
- it "should produce the html report" do
308
- File.exist?(@testdata.html_coverage_output).should == true
309
- end
310
- end
311
-
312
- describe NCoverConsole, "when producing a report with machine.specifications" do
313
- before :all do
314
- @testdata = NCoverConsoleTestData.new
315
- @ncc = NCoverConsole.new()
316
-
317
- @ncc.extend(SystemPatch)
318
- @ncc.extend(FailPatch)
319
-
320
- @ncc.log_level = :verbose
321
- @ncc.command = @testdata.ncoverpath
322
- @ncc.output :xml => @testdata.xml_coverage_output
323
- @ncc.working_directory = @testdata.working_directory
324
-
325
- mspec = MSpecTestRunner.new(@testdata.mspecpath)
326
- mspec.assemblies @testdata.mspec_test_assembly
327
- mspec.html_output = @testdata.mspec_html_output
328
-
329
- @ncc.testrunner = mspec
330
- @ncc.execute
331
- end
332
-
333
- it "should not fail" do
334
- $task_failed.should be_false
335
- end
336
-
337
- it "should produce the html report" do
338
- File.exist?(@testdata.mspec_html_output.to_s).should be_true
339
- end
340
- end
341
-
342
- describe NCoverConsole, "when providing configuration" do
343
- let :ncoverconsole do
344
- Albacore.configure do |config|
345
- config.ncoverconsole.command = "configured"
346
- end
347
- ncoverconsole = NCoverConsole.new
348
- end
349
-
350
- it "should use the configuration values" do
351
- ncoverconsole.command.should == "configured"
352
- end
353
- end