albacore 0.1.5 → 0.2.0.preview1
Sign up to get free protection for your applications and to get access to all the features.
- data/.autotest +4 -0
- data/README.markdown +1 -1
- data/VERSION +1 -1
- data/install_dependencies.rb +2 -3
- data/lib/albacore.rb +1 -0
- data/lib/albacore/albacoremodel.rb +28 -0
- data/lib/albacore/assemblyinfo.rb +5 -4
- data/lib/albacore/config/assemblyinfoconfig.rb +21 -0
- data/lib/albacore/config/config.rb +14 -0
- data/lib/albacore/config/cscconfig.rb +33 -0
- data/lib/albacore/config/docuconfig.rb +25 -0
- data/lib/albacore/config/execconfig.rb +22 -0
- data/lib/albacore/config/msbuildconfig.rb +32 -0
- data/lib/albacore/config/mspecconfig.rb +21 -0
- data/lib/albacore/config/nantconfig.rb +22 -0
- data/lib/albacore/config/ncoverconsoleconfig.rb +22 -0
- data/lib/albacore/config/ncoverreportconfig.rb +22 -0
- data/lib/albacore/config/ndependconfig.rb +22 -0
- data/lib/albacore/config/netversion.rb +23 -0
- data/lib/albacore/config/nunitconfig.rb +20 -0
- data/lib/albacore/config/specflowreportconfig.rb +27 -0
- data/lib/albacore/config/sqlcmdconfig.rb +22 -0
- data/lib/albacore/config/unzipconfig.rb +22 -0
- data/lib/albacore/config/xbuildconfig.rb +22 -0
- data/lib/albacore/config/xunitconfig.rb +22 -0
- data/lib/albacore/config/zipconfig.rb +22 -0
- data/lib/albacore/csc.rb +31 -0
- data/lib/albacore/docu.rb +8 -6
- data/lib/albacore/exec.rb +9 -3
- data/lib/albacore/msbuild.rb +5 -12
- data/lib/albacore/mspectestrunner.rb +9 -7
- data/lib/albacore/nant.rb +5 -4
- data/lib/albacore/ncoverconsole.rb +6 -9
- data/lib/albacore/ncoverreport.rb +8 -6
- data/lib/albacore/ncoverreports/codecoveragebase.rb +4 -4
- data/lib/albacore/ncoverreports/cyclomaticcomplexity.rb +4 -4
- data/lib/albacore/ncoverreports/fullcoveragereport.rb +3 -3
- data/lib/albacore/ncoverreports/reportfilterbase.rb +4 -4
- data/lib/albacore/ncoverreports/summaryreport.rb +3 -3
- data/lib/albacore/ndepend.rb +12 -9
- data/lib/albacore/nunittestrunner.rb +9 -7
- data/lib/albacore/specflowreport.rb +62 -0
- data/lib/albacore/sqlcmd.rb +8 -6
- data/lib/albacore/support/attrmethods.rb +7 -8
- data/lib/albacore/support/logging.rb +8 -4
- data/lib/albacore/support/openstruct.rb +13 -0
- data/lib/albacore/support/runcommand.rb +24 -24
- data/lib/albacore/support/supportlinux.rb +23 -0
- data/lib/albacore/support/yamlconfig.rb +2 -10
- data/lib/albacore/unzip.rb +14 -12
- data/lib/albacore/xbuild.rb +6 -5
- data/lib/albacore/xunittestrunner.rb +8 -6
- data/lib/albacore/zipdirectory.rb +27 -6
- data/lib/rake/csctask.rb +3 -0
- data/lib/rake/specflowreporttask.rb +3 -0
- data/lib/rake/unziptask.rb +1 -1
- data/rakefile.rb +21 -54
- data/spec/albacoremodel_spec.rb +35 -0
- data/spec/assemblyinfo_spec.rb +17 -0
- data/spec/attrmethods_spec.rb +17 -1
- data/spec/config_spec.rb +19 -0
- data/spec/createtask_spec.rb +45 -4
- data/spec/csc_spec.rb +87 -0
- data/spec/csctask_spec.rb +1 -0
- data/spec/docu_spec.rb +43 -1
- data/spec/exec_spec.rb +16 -1
- data/spec/msbuild_spec.rb +30 -18
- data/spec/mspec_spec.rb +28 -0
- data/spec/nant_spec.rb +20 -12
- data/spec/ncoverconsole_spec.rb +25 -13
- data/spec/ncoverreport_spec.rb +31 -18
- data/spec/ndepend_spec.rb +23 -2
- data/spec/nunittestrunner_spec.rb +48 -0
- data/spec/runcommand_spec.rb +59 -32
- data/spec/specflowreport_spec.rb +146 -0
- data/spec/specflowreporttask_spec.rb +48 -0
- data/spec/sqlcmd_spec.rb +18 -5
- 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/TestSolution.5.0.ReSharper.user +27 -0
- data/spec/support/TestSolution/TestSolution.SpecFlow/OneFeature.feature +8 -0
- data/spec/support/TestSolution/TestSolution.SpecFlow/OneFeature.feature.cs +73 -0
- data/spec/support/TestSolution/TestSolution.SpecFlow/Properties/AssemblyInfo.cs +36 -0
- data/spec/support/TestSolution/TestSolution.SpecFlow/StepDefinition.cs +30 -0
- data/spec/support/TestSolution/TestSolution.SpecFlow/TestSolution.SpecFlow.csproj +84 -0
- data/spec/support/TestSolution/TestSolution.sln +6 -0
- data/spec/support/csc/File1.cs +9 -0
- data/spec/support/csc/File2.cs +9 -0
- data/spec/support/csc/output/ignorethis.txt +1 -0
- data/spec/support/msbuildtestdata.rb +3 -3
- data/spec/support/ncoverreporttestdata.rb +2 -2
- data/spec/support/spec_helper.rb +2 -1
- data/spec/support/yamlconfig/yaml_autoconfig_test.yml +1 -1
- data/spec/unzip_spec.rb +15 -0
- data/spec/xbuild_spec.rb +15 -0
- data/spec/xunit_spec.rb +16 -2
- data/spec/yamlconfig_spec.rb +7 -6
- data/spec/zip_spec.rb +50 -9
- data/watchrtesting.rb +8 -0
- metadata +99 -91
- data/lib/albacore/expandtemplates.rb +0 -81
- data/lib/albacore/plink.rb +0 -49
- data/lib/albacore/renamer.rb +0 -17
- data/lib/albacore/sftp.rb +0 -42
- data/lib/albacore/ssh.rb +0 -44
- data/lib/albacore/support/albacore_helper.rb +0 -1
- data/lib/albacore/support/globalconfig.rb +0 -6
- data/lib/rake/expandtemplatestask.rb +0 -3
- data/lib/rake/plinktask.rb +0 -3
- data/lib/rake/renametask.rb +0 -3
- data/lib/rake/sftptask.rb +0 -3
- data/lib/rake/sshtask.rb +0 -3
- data/spec/expandtemplates_spec.rb +0 -180
- data/spec/expandtemplatestask_spec.rb +0 -46
- data/spec/plink_spec.rb +0 -62
- data/spec/plinktask_spec.rb +0 -46
- data/spec/renametask_spec.rb +0 -32
- data/spec/sftp_spec.rb +0 -30
- data/spec/sftptask_spec.rb +0 -42
- data/spec/ssh_spec.rb +0 -47
- data/spec/sshtask_spec.rb +0 -40
- data/spec/support/expandtemplates/datafiles/multiplevalues.yml +0 -3
- data/spec/support/expandtemplates/datafiles/multitemplate-specificfile.yml +0 -11
- data/spec/support/expandtemplates/datafiles/multitemplate.yml +0 -4
- data/spec/support/expandtemplates/datafiles/sample.yml +0 -1
- data/spec/support/expandtemplates/datafiles/sample_with_include.yml +0 -2
- data/spec/support/expandtemplates/datafiles/template_specific_data_file_with_include.yml +0 -5
- data/spec/support/expandtemplates/datafiles/template_specific_include.yml +0 -3
- data/spec/support/expandtemplates/templates/multipleinstance.config +0 -4
- data/spec/support/expandtemplates/templates/multiplevalues.config +0 -1
- data/spec/support/expandtemplates/templates/sample.config +0 -1
- data/spec/support/expandtemplatestestdata.rb +0 -77
data/spec/csc_spec.rb
ADDED
@@ -0,0 +1,87 @@
|
|
1
|
+
require File.join(File.dirname(__FILE__), 'support', 'spec_helper')
|
2
|
+
require 'albacore/csc'
|
3
|
+
|
4
|
+
Albacore.configure do |config|
|
5
|
+
config.log_level = :verbose
|
6
|
+
end
|
7
|
+
|
8
|
+
describe CSC, "when supplying a file list with 2 files to compile" do
|
9
|
+
let :csc do
|
10
|
+
csc = CSC.new
|
11
|
+
csc.compile = FileList["File1.cs", "File2.cs"]
|
12
|
+
csc.extend(SystemPatch)
|
13
|
+
csc.disable_system = true
|
14
|
+
csc.execute
|
15
|
+
csc
|
16
|
+
end
|
17
|
+
|
18
|
+
it "should provide the first file to the compiler" do
|
19
|
+
csc.system_command.should include("\"File1.cs\"")
|
20
|
+
end
|
21
|
+
|
22
|
+
it "should provide the second file to the compiler" do
|
23
|
+
csc.system_command.should include("\"File2.cs\"")
|
24
|
+
end
|
25
|
+
end
|
26
|
+
|
27
|
+
describe CSC, "when targeting a library and an output file" do
|
28
|
+
before :each do
|
29
|
+
@folder = File.join(File.expand_path(File.dirname(__FILE__)), "support", "csc")
|
30
|
+
csc = CSC.new
|
31
|
+
csc.compile FileList[File.join(@folder, "File1.cs")]
|
32
|
+
csc.target = :library
|
33
|
+
csc.output = File.join(@folder, "output", "File1.dll")
|
34
|
+
csc.execute
|
35
|
+
end
|
36
|
+
|
37
|
+
it "should produce the .dll file in the correct location" do
|
38
|
+
File.exist?(File.join(@folder, "output", "File1.dll")).should be_true
|
39
|
+
end
|
40
|
+
end
|
41
|
+
|
42
|
+
describe CSC, "when referencing existing assemblies" do
|
43
|
+
let :csc do
|
44
|
+
csc = CSC.new
|
45
|
+
csc.references "foobar.dll"
|
46
|
+
|
47
|
+
csc.extend(SystemPatch)
|
48
|
+
csc.disable_system = true
|
49
|
+
csc.execute
|
50
|
+
csc
|
51
|
+
end
|
52
|
+
|
53
|
+
it "should specify the reference on the command line" do
|
54
|
+
csc.system_command.should include("\"/reference:foobar.dll\"")
|
55
|
+
end
|
56
|
+
end
|
57
|
+
|
58
|
+
describe CSC, "when configuring the version to use" do
|
59
|
+
let :csc do
|
60
|
+
Albacore.configure do |config|
|
61
|
+
config.csc.use :net35
|
62
|
+
end
|
63
|
+
csc = CSC.new
|
64
|
+
csc
|
65
|
+
end
|
66
|
+
|
67
|
+
it "should use the configured version" do
|
68
|
+
win_dir = ENV['windir'] || ENV['WINDIR'] || "C:/Windows"
|
69
|
+
csc.command.should == File.join(win_dir.dup, 'Microsoft.NET', 'Framework', 'v3.5', 'csc.exe')
|
70
|
+
end
|
71
|
+
end
|
72
|
+
|
73
|
+
describe CSC, "when version to use has been configured and overriding" do
|
74
|
+
let :csc do
|
75
|
+
Albacore.configure do |config|
|
76
|
+
config.csc.use :net35
|
77
|
+
end
|
78
|
+
csc = CSC.new
|
79
|
+
csc.use :net40
|
80
|
+
csc
|
81
|
+
end
|
82
|
+
|
83
|
+
it "should use the override version" do
|
84
|
+
win_dir = ENV['windir'] || ENV['WINDIR'] || "C:/Windows"
|
85
|
+
csc.command.should == File.join(win_dir.dup, 'Microsoft.NET', 'Framework', 'v4.0.30319', 'csc.exe')
|
86
|
+
end
|
87
|
+
end
|
@@ -0,0 +1 @@
|
|
1
|
+
|
data/spec/docu_spec.rb
CHANGED
@@ -67,4 +67,46 @@ describe Docu, "when building docs with an output location specified" do
|
|
67
67
|
it "should pass the output location using the --output switch" do
|
68
68
|
@docu.command_parameters.should include('--output="output_location"')
|
69
69
|
end
|
70
|
-
end
|
70
|
+
end
|
71
|
+
|
72
|
+
describe Docu, "when the command has been provided through configuration" do
|
73
|
+
let :docu do
|
74
|
+
Albacore.configure do |config|
|
75
|
+
config.docu.command = "configured"
|
76
|
+
end
|
77
|
+
docu = Docu.new
|
78
|
+
docu
|
79
|
+
end
|
80
|
+
|
81
|
+
it "should use the configured command" do
|
82
|
+
docu.command.should == "configured"
|
83
|
+
end
|
84
|
+
end
|
85
|
+
|
86
|
+
describe Docu, "when the command has been provided through configuration and is overriden through the initializer" do
|
87
|
+
let :docu do
|
88
|
+
Albacore.configure do |config|
|
89
|
+
config.docu.command = "configured"
|
90
|
+
end
|
91
|
+
docu = Docu.new("override")
|
92
|
+
docu
|
93
|
+
end
|
94
|
+
|
95
|
+
it "should use the override" do
|
96
|
+
docu.command.should == "override"
|
97
|
+
end
|
98
|
+
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
@@ -9,7 +9,7 @@ describe Exec, "when executing a command with parameters" do
|
|
9
9
|
@cmd.log_level = :verbose
|
10
10
|
@cmd.extend(SystemPatch)
|
11
11
|
@cmd.extend(FailPatch)
|
12
|
-
@cmd.
|
12
|
+
@cmd.command = @nunit
|
13
13
|
@cmd.parameters "--help"
|
14
14
|
@cmd.execute
|
15
15
|
end
|
@@ -27,4 +27,19 @@ describe Exec, "when executing a command with parameters" do
|
|
27
27
|
end
|
28
28
|
end
|
29
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
|
30
40
|
|
41
|
+
it "should use the configuration" do
|
42
|
+
exec.command.should == "foo.exe"
|
43
|
+
exec.parameters.should == ["bar", "baz"]
|
44
|
+
end
|
45
|
+
end
|
data/spec/msbuild_spec.rb
CHANGED
@@ -1,5 +1,6 @@
|
|
1
1
|
require File.join(File.dirname(__FILE__), 'support', 'spec_helper')
|
2
2
|
require 'albacore/msbuild'
|
3
|
+
require 'albacore/config/msbuildconfig'
|
3
4
|
require 'msbuildtestdata'
|
4
5
|
|
5
6
|
shared_examples_for "prepping msbuild" do
|
@@ -9,7 +10,7 @@ shared_examples_for "prepping msbuild" do
|
|
9
10
|
@strio = StringIO.new
|
10
11
|
@msbuild.log_device = @strio
|
11
12
|
@msbuild.log_level = :verbose
|
12
|
-
|
13
|
+
end
|
13
14
|
end
|
14
15
|
|
15
16
|
describe MSBuild, "when building a solution with verbose logging turned on" do
|
@@ -23,7 +24,7 @@ describe MSBuild, "when building a solution with verbose logging turned on" do
|
|
23
24
|
end
|
24
25
|
|
25
26
|
it "should log the msbuild command line being called" do
|
26
|
-
@log_data.should include("Executing MSBuild: \"C:\\Windows/Microsoft.NET/Framework/
|
27
|
+
@log_data.should include("Executing MSBuild: \"C:\\Windows/Microsoft.NET/Framework/v4.0.30319/MSBuild.exe\"")
|
27
28
|
end
|
28
29
|
end
|
29
30
|
|
@@ -47,8 +48,8 @@ describe MSBuild, "when an msbuild path is not specified" do
|
|
47
48
|
@msbuild = @testdata.msbuild
|
48
49
|
end
|
49
50
|
|
50
|
-
it "should default to the .net framework
|
51
|
-
@msbuild.
|
51
|
+
it "should default to the .net framework v4" do
|
52
|
+
@msbuild.command.should == @testdata.msbuild_path
|
52
53
|
end
|
53
54
|
end
|
54
55
|
|
@@ -59,27 +60,38 @@ describe MSBuild, "when an msbuild path is specified" do
|
|
59
60
|
end
|
60
61
|
|
61
62
|
it "should use the specified path for the msbuild exe" do
|
62
|
-
@msbuild.
|
63
|
+
@msbuild.command.should == "Some Path"
|
63
64
|
end
|
64
65
|
end
|
65
66
|
|
66
|
-
describe MSBuild, "when
|
67
|
+
describe MSBuild, "when msbuild is configured to use a specific .net version" do
|
67
68
|
before :all do
|
69
|
+
Albacore.configure do |config|
|
70
|
+
config.msbuild.use :net35
|
71
|
+
end
|
68
72
|
@testdata = MSBuildTestData.new
|
69
|
-
msbuild = @testdata.msbuild
|
70
|
-
|
71
|
-
@strio = StringIO.new
|
72
|
-
msbuild.log_device = @strio
|
73
|
-
msbuild.log_level = :verbose
|
74
|
-
msbuild.solution = @testdata.solution_path
|
75
|
-
|
76
|
-
msbuild.build
|
73
|
+
@msbuild = @testdata.msbuild
|
74
|
+
end
|
77
75
|
|
78
|
-
|
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
79
|
end
|
80
|
-
|
81
|
-
|
82
|
-
|
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')
|
83
95
|
end
|
84
96
|
end
|
85
97
|
|
data/spec/mspec_spec.rb
ADDED
@@ -0,0 +1,28 @@
|
|
1
|
+
require File.join(File.dirname(__FILE__), 'support', '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
|
data/spec/nant_spec.rb
CHANGED
@@ -27,23 +27,19 @@ describe NAnt, "when a nant path is not specified" do
|
|
27
27
|
it "should fail" do
|
28
28
|
$task_failed.should == true
|
29
29
|
end
|
30
|
-
|
31
|
-
it "should log the missing command path" do
|
32
|
-
@log_data.should include("Command not found: ")
|
33
|
-
end
|
34
30
|
end
|
35
31
|
|
36
32
|
describe NAnt, "when running a nant build file" do
|
37
33
|
it_should_behave_like "prepping nant"
|
38
34
|
|
39
35
|
before :all do
|
40
|
-
@nant.
|
36
|
+
@nant.command = @testdata.nant_path
|
41
37
|
@nant.build_file = @testdata.build_file_path
|
42
38
|
@nant.run
|
43
39
|
end
|
44
40
|
|
45
41
|
it "should execute the default task" do
|
46
|
-
File.exists?("#{@testdata.output_path}/buildfile.txt").should
|
42
|
+
File.exists?("#{@testdata.output_path}/buildfile.txt").should be_true
|
47
43
|
end
|
48
44
|
end
|
49
45
|
|
@@ -51,18 +47,18 @@ describe NAnt, "when running specific targets" do
|
|
51
47
|
it_should_behave_like "prepping nant"
|
52
48
|
|
53
49
|
before :all do
|
54
|
-
@nant.
|
50
|
+
@nant.command = @testdata.nant_path
|
55
51
|
@nant.build_file = @testdata.build_file_path
|
56
52
|
@nant.targets :build, :other
|
57
53
|
@nant.run
|
58
54
|
end
|
59
55
|
|
60
56
|
it "should execute the first task" do
|
61
|
-
File.exists?("#{@testdata.output_path}/buildfile.txt").should
|
57
|
+
File.exists?("#{@testdata.output_path}/buildfile.txt").should be_true
|
62
58
|
end
|
63
59
|
|
64
60
|
it "should execute the second task" do
|
65
|
-
File.exists?("#{@testdata.output_path}/otherfile.txt").should
|
61
|
+
File.exists?("#{@testdata.output_path}/otherfile.txt").should be_true
|
66
62
|
end
|
67
63
|
end
|
68
64
|
|
@@ -73,7 +69,7 @@ describe NAnt, "when specifying multiple configuration properties" do
|
|
73
69
|
@nant = @testdata.nant
|
74
70
|
@strio = StringIO.new
|
75
71
|
@nant.log_device = @strio
|
76
|
-
@nant.
|
72
|
+
@nant.command = @testdata.nant_path
|
77
73
|
@nant.build_file = @testdata.build_file_path
|
78
74
|
|
79
75
|
@nant.properties :version => "1.2.3", "build.mode" => :fast, :debug => false
|
@@ -93,10 +89,22 @@ describe NAnt, "when specifying multiple configuration properties" do
|
|
93
89
|
end
|
94
90
|
|
95
91
|
it "should create the output file" do
|
96
|
-
File.exists?("#{@testdata.output_path}/buildfile.txt").should
|
92
|
+
File.exists?("#{@testdata.output_path}/buildfile.txt").should be_true
|
97
93
|
end
|
98
94
|
|
99
95
|
after :all do
|
100
96
|
@testdata.clean_output
|
101
97
|
end
|
102
|
-
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
|
data/spec/ncoverconsole_spec.rb
CHANGED
@@ -13,7 +13,7 @@ describe NCoverConsole, "when specifying assemblies to cover" do
|
|
13
13
|
|
14
14
|
@ncc.extend(SystemPatch)
|
15
15
|
@ncc.log_level = :verbose
|
16
|
-
@ncc.
|
16
|
+
@ncc.command = @testdata.ncoverpath
|
17
17
|
@ncc.output :xml => @testdata.xml_coverage_output
|
18
18
|
@ncc.working_directory = @testdata.working_directory
|
19
19
|
@ncc.cover_assemblies "TestSolution"
|
@@ -40,7 +40,7 @@ describe NCoverConsole, "when specifying assemblies with spaces in the name" do
|
|
40
40
|
|
41
41
|
@ncc.extend(SystemPatch)
|
42
42
|
@ncc.log_level = :verbose
|
43
|
-
@ncc.
|
43
|
+
@ncc.command = @testdata.ncoverpath
|
44
44
|
@ncc.output :xml => @testdata.xml_coverage_output
|
45
45
|
@ncc.working_directory = @testdata.working_directory
|
46
46
|
@ncc.cover_assemblies "assemblies/with spaces/TestSolution"
|
@@ -68,7 +68,7 @@ describe NCoverConsole, "when specifying assemblies to ignore" do
|
|
68
68
|
|
69
69
|
@ncc.extend(SystemPatch)
|
70
70
|
@ncc.log_level = :verbose
|
71
|
-
@ncc.
|
71
|
+
@ncc.command = @testdata.ncoverpath
|
72
72
|
@ncc.output :xml => @testdata.xml_coverage_output
|
73
73
|
@ncc.working_directory = @testdata.working_directory
|
74
74
|
@ncc.exclude_assemblies "TestSolution.*"
|
@@ -95,7 +95,7 @@ describe NCoverConsole, "when specifying attributes to exclude" do
|
|
95
95
|
|
96
96
|
@ncc.extend(SystemPatch)
|
97
97
|
@ncc.log_level = :verbose
|
98
|
-
@ncc.
|
98
|
+
@ncc.command = @testdata.ncoverpath
|
99
99
|
@ncc.output :xml => @testdata.xml_coverage_output
|
100
100
|
@ncc.working_directory = @testdata.working_directory
|
101
101
|
@ncc.exclude_attributes "excludeme", "excludeme_too"
|
@@ -121,14 +121,14 @@ describe NCoverConsole, "when running with the defaults" do
|
|
121
121
|
@ncc.extend(SystemPatch)
|
122
122
|
@ncc.extend(FailPatch)
|
123
123
|
|
124
|
-
@ncc.
|
124
|
+
@ncc.command = @testdata.ncoverpath
|
125
125
|
@ncc.testrunner = NUnitTestRunner.new
|
126
126
|
|
127
127
|
@ncc.run
|
128
128
|
end
|
129
129
|
|
130
130
|
it "should include the register flag in the command" do
|
131
|
-
@ncc.system_command.should include
|
131
|
+
@ncc.system_command.should include("//reg")
|
132
132
|
end
|
133
133
|
end
|
134
134
|
|
@@ -140,7 +140,7 @@ describe NCoverConsole, "when opting out of registering the ncover dll" do
|
|
140
140
|
@ncc.extend(SystemPatch)
|
141
141
|
@ncc.extend(FailPatch)
|
142
142
|
|
143
|
-
@ncc.
|
143
|
+
@ncc.command = @testdata.ncoverpath
|
144
144
|
@ncc.no_registration
|
145
145
|
@ncc.testrunner = NUnitTestRunner.new
|
146
146
|
|
@@ -148,7 +148,7 @@ describe NCoverConsole, "when opting out of registering the ncover dll" do
|
|
148
148
|
end
|
149
149
|
|
150
150
|
it "should not include the register flag in the command" do
|
151
|
-
@ncc.system_command.should_not include
|
151
|
+
@ncc.system_command.should_not include("//reg")
|
152
152
|
end
|
153
153
|
end
|
154
154
|
|
@@ -161,7 +161,7 @@ describe NCoverConsole, "when specifying the types of coverage to analyze" do
|
|
161
161
|
|
162
162
|
@ncc.extend(SystemPatch)
|
163
163
|
@ncc.log_level = :verbose
|
164
|
-
@ncc.
|
164
|
+
@ncc.command = @testdata.ncoverpath
|
165
165
|
@ncc.output :xml => @testdata.xml_coverage_output
|
166
166
|
@ncc.working_directory = @testdata.working_directory
|
167
167
|
@ncc.coverage :Symbol, :Branch, :MethodVisits, :CyclomaticComplexity
|
@@ -192,7 +192,7 @@ describe NCoverConsole, "when analyzing a test suite with failing tests" do
|
|
192
192
|
ncc.extend(FailPatch)
|
193
193
|
|
194
194
|
ncc.log_level = :verbose
|
195
|
-
ncc.
|
195
|
+
ncc.command = @testdata.ncoverpath
|
196
196
|
ncc.output :xml => @testdata.xml_coverage_output
|
197
197
|
ncc.working_directory = @testdata.working_directory
|
198
198
|
|
@@ -245,7 +245,7 @@ describe NCoverConsole, "when producing an xml coverage report with nunit" do
|
|
245
245
|
|
246
246
|
@ncc.extend(SystemPatch)
|
247
247
|
@ncc.log_level = :verbose
|
248
|
-
@ncc.
|
248
|
+
@ncc.command = @testdata.ncoverpath
|
249
249
|
@ncc.output :xml => @testdata.xml_coverage_output
|
250
250
|
@ncc.working_directory = @testdata.working_directory
|
251
251
|
|
@@ -292,7 +292,7 @@ describe NCoverConsole, "when specifying an html report and an xml coverage repo
|
|
292
292
|
|
293
293
|
ncc.extend(SystemPatch)
|
294
294
|
ncc.log_level = :verbose
|
295
|
-
ncc.
|
295
|
+
ncc.command = @testdata.ncoverpath
|
296
296
|
ncc.output :xml => @testdata.xml_coverage_output, :html => @testdata.html_coverage_output
|
297
297
|
ncc.working_directory = @testdata.working_directory
|
298
298
|
|
@@ -323,7 +323,7 @@ describe NCoverConsole, "when producing a report with machine.specifications" do
|
|
323
323
|
@ncc.extend(FailPatch)
|
324
324
|
|
325
325
|
@ncc.log_level = :verbose
|
326
|
-
@ncc.
|
326
|
+
@ncc.command = @testdata.ncoverpath
|
327
327
|
@ncc.output :xml => @testdata.xml_coverage_output
|
328
328
|
@ncc.working_directory = @testdata.working_directory
|
329
329
|
|
@@ -342,5 +342,17 @@ describe NCoverConsole, "when producing a report with machine.specifications" do
|
|
342
342
|
it "should produce the html report" do
|
343
343
|
File.exist?(@testdata.mspec_html_output.to_s).should be_true
|
344
344
|
end
|
345
|
+
end
|
346
|
+
|
347
|
+
describe NCoverConsole, "when providing configuration" do
|
348
|
+
let :ncoverconsole do
|
349
|
+
Albacore.configure do |config|
|
350
|
+
config.ncoverconsole.command = "configured"
|
351
|
+
end
|
352
|
+
ncoverconsole = NCoverConsole.new
|
353
|
+
end
|
345
354
|
|
355
|
+
it "should use the configuration values" do
|
356
|
+
ncoverconsole.command.should == "configured"
|
357
|
+
end
|
346
358
|
end
|