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.
- data/Gemfile +7 -7
- data/README.markdown +0 -33
- data/VERSION +1 -1
- metadata +84 -91
- data/spec/albacoremodel_spec.rb +0 -53
- data/spec/assemblyinfo_spec.rb +0 -541
- data/spec/attrmethods_spec.rb +0 -136
- data/spec/config_spec.rb +0 -34
- data/spec/createtask_spec.rb +0 -236
- data/spec/csc_spec.rb +0 -253
- data/spec/docu_spec.rb +0 -109
- data/spec/exec_spec.rb +0 -45
- data/spec/fluentmigratorrunner_spec.rb +0 -254
- data/spec/msbuild_spec.rb +0 -215
- data/spec/mspec_spec.rb +0 -28
- data/spec/mstesttestrunner_spec.rb +0 -142
- data/spec/nant_spec.rb +0 -110
- data/spec/nchurn_spec.rb +0 -75
- data/spec/ncoverconsole_spec.rb +0 -353
- data/spec/ncoverreport_spec.rb +0 -619
- data/spec/ndepend_spec.rb +0 -72
- data/spec/nunittestrunner_spec.rb +0 -122
- data/spec/nuspec_spec.rb +0 -78
- data/spec/output_spec.rb +0 -117
- data/spec/patches/docu_patch.rb +0 -13
- data/spec/patches/fail_patch.rb +0 -9
- data/spec/patches/system_patch.rb +0 -20
- data/spec/plink_spec.rb +0 -62
- data/spec/runcommand_spec.rb +0 -94
- data/spec/spec_helper.rb +0 -17
- data/spec/specflowreport_spec.rb +0 -146
- data/spec/sqlcmd_spec.rb +0 -334
- data/spec/support/assemblyinfotester.rb +0 -51
- data/spec/support/ironruby_validator.rb +0 -26
- data/spec/support/msbuildtestdata.rb +0 -32
- data/spec/support/nanttestdata.rb +0 -33
- data/spec/support/ncoverconsoletestdata.rb +0 -20
- data/spec/support/ncoverreporttestdata.rb +0 -26
- data/spec/support/nokogiri_validator.rb +0 -15
- data/spec/support/outputtestdata.rb +0 -13
- data/spec/support/ziptestdata.rb +0 -13
- data/spec/unzip_spec.rb +0 -15
- data/spec/xbuild_spec.rb +0 -15
- data/spec/xunit_spec.rb +0 -168
- data/spec/yamlconfig_spec.rb +0 -49
- data/spec/zip_spec.rb +0 -104
@@ -1,51 +0,0 @@
|
|
1
|
-
require 'albacore/assemblyinfo'
|
2
|
-
|
3
|
-
class AssemblyInfoTester < AssemblyInfo
|
4
|
-
|
5
|
-
attr_accessor :assemblyinfo_file
|
6
|
-
|
7
|
-
def initialize(lang_engine = nil)
|
8
|
-
@version = "0.0.0.1"
|
9
|
-
@title = "some assembly title"
|
10
|
-
@description = "some assembly description goes here."
|
11
|
-
@copyright = "some copyright info goes here"
|
12
|
-
@com_visible = false
|
13
|
-
@com_guid = "dbabb27c-a536-4b5b-91f1-2226b6e3655c"
|
14
|
-
@company_name = "some company name"
|
15
|
-
@product_name = "my product, yo."
|
16
|
-
@file_version = "1.0.0.0"
|
17
|
-
@trademark = "some trademark info goes here"
|
18
|
-
|
19
|
-
@input_file = nil
|
20
|
-
end
|
21
|
-
|
22
|
-
def setup_assemblyinfo_file
|
23
|
-
@lang_engine = CSharpEngine.new unless check_lang_engine
|
24
|
-
|
25
|
-
@assemblyinfo_file = File.join(File.dirname(__FILE__), "AssemblyInfo", "AssemblyInfo.test")
|
26
|
-
File.delete @assemblyinfo_file if File.exist? @assemblyinfo_file
|
27
|
-
end
|
28
|
-
|
29
|
-
def use_input_file
|
30
|
-
@input_file = File.join(File.dirname(__FILE__), "AssemblyInfo", "AssemblyInfoInput.test")
|
31
|
-
end
|
32
|
-
|
33
|
-
def build_and_read_assemblyinfo_file(assemblyinfo)
|
34
|
-
setup_assemblyinfo_file
|
35
|
-
|
36
|
-
assemblyinfo.input_file = @input_file unless @input_file.nil?
|
37
|
-
assemblyinfo.output_file = @assemblyinfo_file
|
38
|
-
assemblyinfo.execute
|
39
|
-
|
40
|
-
contents = ''
|
41
|
-
File.open(@assemblyinfo_file, "r") do |f|
|
42
|
-
contents = f.read
|
43
|
-
end
|
44
|
-
contents
|
45
|
-
end
|
46
|
-
|
47
|
-
def yaml_file
|
48
|
-
return File.join(File.dirname(__FILE__), "AssemblyInfo", "assemblyinfo.yml")
|
49
|
-
end
|
50
|
-
|
51
|
-
end
|
@@ -1,26 +0,0 @@
|
|
1
|
-
class XmlValidator
|
2
|
-
require 'System, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089'
|
3
|
-
require 'System.Xml, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089'
|
4
|
-
|
5
|
-
include System::Xml
|
6
|
-
include System::Xml::Schema
|
7
|
-
|
8
|
-
def self.validate(xml_file, xsd_file)
|
9
|
-
xml = File.read(xml_file)
|
10
|
-
|
11
|
-
settings = XmlReaderSettings.new
|
12
|
-
settings.validation_type = ValidationType.Schema;
|
13
|
-
settings.schemas.add(nil, xsd_file)
|
14
|
-
|
15
|
-
is_valid = true
|
16
|
-
settings.validation_event_handler { |s, e|
|
17
|
-
is_valid = false if e.severity == XmlSeverityType.error
|
18
|
-
}
|
19
|
-
|
20
|
-
reader = XmlReader.create(System::IO::StringReader.new(xml), settings)
|
21
|
-
while reader.read
|
22
|
-
end
|
23
|
-
|
24
|
-
return is_valid
|
25
|
-
end
|
26
|
-
end
|
@@ -1,32 +0,0 @@
|
|
1
|
-
require 'albacore/msbuild'
|
2
|
-
|
3
|
-
class MSBuildTestData
|
4
|
-
|
5
|
-
attr_accessor :msbuild_path, :solution_path, :config_mode, :output_path
|
6
|
-
|
7
|
-
def initialize(config_mode='Debug')
|
8
|
-
@solution_path = File.join(File.dirname(__FILE__), "../", "support", "TestSolution", "TestSolution.sln")
|
9
|
-
@msbuild_path = "C:\\Windows/Microsoft.NET/Framework/v4.0.30319/MSBuild.exe"
|
10
|
-
@config_mode = config_mode
|
11
|
-
|
12
|
-
setup_output
|
13
|
-
end
|
14
|
-
|
15
|
-
def setup_output
|
16
|
-
@output_path = File.join(File.dirname(__FILE__), "../", "support", "TestSolution", "TestSolution", "bin", "#{@config_mode}", "TestSolution.dll")
|
17
|
-
File.delete @output_path if File.exist? @output_path
|
18
|
-
end
|
19
|
-
|
20
|
-
def msbuild(path_to_msbuild=nil)
|
21
|
-
@msbuild = MSBuild.new
|
22
|
-
|
23
|
-
if (path_to_msbuild)
|
24
|
-
@msbuild_path = path_to_msbuild
|
25
|
-
@msbuild.command = path_to_msbuild
|
26
|
-
end
|
27
|
-
|
28
|
-
@msbuild.extend(SystemPatch)
|
29
|
-
@msbuild
|
30
|
-
end
|
31
|
-
|
32
|
-
end
|
@@ -1,33 +0,0 @@
|
|
1
|
-
require 'albacore/nant'
|
2
|
-
|
3
|
-
class NAntTestData
|
4
|
-
|
5
|
-
attr_accessor :nant_path, :build_file_path, :output_path
|
6
|
-
|
7
|
-
def initialize(config_mode='Debug',version='0.0.1')
|
8
|
-
@config_mode = config_mode
|
9
|
-
@version = version
|
10
|
-
|
11
|
-
@nant_path = File.join(File.dirname(__FILE__), "Tools", "NAnt-0.85", "bin", "NAnt.exe")
|
12
|
-
@build_file_path = File.join(File.dirname(__FILE__), "TestSolution", "TestSolution.build")
|
13
|
-
setup_output
|
14
|
-
end
|
15
|
-
|
16
|
-
def setup_output
|
17
|
-
@output_root = File.join(File.dirname(__FILE__), "TestSolution", "out")
|
18
|
-
@output_path = File.join(@output_root, "#{@version}", "#{@config_mode}")
|
19
|
-
clean_output
|
20
|
-
end
|
21
|
-
|
22
|
-
def clean_output
|
23
|
-
FileUtils.rm_rf @output_root
|
24
|
-
end
|
25
|
-
|
26
|
-
def nant
|
27
|
-
@nant = NAnt.new
|
28
|
-
|
29
|
-
@nant.extend(SystemPatch)
|
30
|
-
@nant
|
31
|
-
end
|
32
|
-
|
33
|
-
end
|
@@ -1,20 +0,0 @@
|
|
1
|
-
class NCoverConsoleTestData
|
2
|
-
attr_accessor :ncoverpath, :nunitpath, :xml_coverage_output, :html_coverage_output, :working_directory
|
3
|
-
attr_accessor :test_assembly, :failing_test_assembly, :mspecpath, :mspec_html_output, :mspec_test_assembly
|
4
|
-
attr_accessor :test_assembly_with_spaces
|
5
|
-
|
6
|
-
def initialize
|
7
|
-
@ncoverpath = File.join(File.dirname(__FILE__), '..', 'support', 'Tools', 'NCover-v3.3', 'NCover.Console.exe')
|
8
|
-
@nunitpath = File.join(File.dirname(__FILE__), '..', 'support', 'Tools', 'NUnit-v2.5', 'nunit-console-x86.exe')
|
9
|
-
@xml_coverage_output = File.join(File.expand_path(File.dirname(__FILE__)), '..', 'support', 'CodeCoverage', 'nunit', 'test-coverage.xml')
|
10
|
-
@html_coverage_output = File.join(File.expand_path(File.dirname(__FILE__)), '..', 'support', 'CodeCoverage', 'nunit', 'html', 'test-coverage.html')
|
11
|
-
@working_directory = File.join(File.expand_path(File.dirname(__FILE__)), '..', 'support', 'CodeCoverage', 'nunit')
|
12
|
-
@test_assembly = File.join(File.expand_path(File.dirname(__FILE__)), '..', 'support', 'CodeCoverage', 'nunit', 'assemblies', 'TestSolution.Tests.dll')
|
13
|
-
@test_assembly_with_spaces = File.join(File.expand_path(File.dirname(__FILE__)), '..', 'support', 'CodeCoverage', 'nunit', 'assemblies/with spaces/', 'TestSolution.Tests.dll')
|
14
|
-
@failing_test_assembly = File.join(File.expand_path(File.dirname(__FILE__)), '..', 'support', 'CodeCoverage', 'nunit', 'failing_assemblies', 'TestSolution.FailingTests.dll')
|
15
|
-
|
16
|
-
@mspecpath = File.join(File.dirname(__FILE__), '..', 'support', 'Tools', 'Machine.Specification-v0.2', 'Machine.Specifications.ConsoleRunner.exe')
|
17
|
-
@mspec_html_output = File.join(File.expand_path(File.dirname(__FILE__)), '..', 'support', 'CodeCoverage', 'mspec', 'html')
|
18
|
-
@mspec_test_assembly = File.join(File.expand_path(File.dirname(__FILE__)), '..', 'support', 'CodeCoverage', 'mspec', 'assemblies', 'TestSolution.MSpecTests.dll')
|
19
|
-
end
|
20
|
-
end
|
@@ -1,26 +0,0 @@
|
|
1
|
-
class NCoverReportTestData
|
2
|
-
@filedir = File.dirname(__FILE__)
|
3
|
-
@output_folder = File.expand_path(File.join(@filedir, "CodeCoverage", "report", "output"))
|
4
|
-
|
5
|
-
def self.command
|
6
|
-
File.expand_path(File.join(@filedir, "Tools", "NCover-v3.3", "NCover.Reporting.exe"))
|
7
|
-
end
|
8
|
-
|
9
|
-
def self.coverage_file
|
10
|
-
File.expand_path(File.join(@filedir, "CodeCoverage", "report", "coverage.xml"))
|
11
|
-
end
|
12
|
-
|
13
|
-
def self.output_folder
|
14
|
-
@output_folder
|
15
|
-
end
|
16
|
-
|
17
|
-
def self.clean_output_folder
|
18
|
-
FileUtils.rmtree(@output_folder)
|
19
|
-
Dir.mkdir(@output_folder) unless File.exist?(@output_folder)
|
20
|
-
sleep(3) # this is a hack to work around the slow hard drive in my laptop, which caused failing tests w/ write-through-cache.
|
21
|
-
end
|
22
|
-
|
23
|
-
def self.summary_output_file
|
24
|
-
File.join(NCoverReportTestData.output_folder, "summary.html")
|
25
|
-
end
|
26
|
-
end
|
@@ -1,15 +0,0 @@
|
|
1
|
-
require 'nokogiri'
|
2
|
-
|
3
|
-
class XmlValidator
|
4
|
-
def self.validate(xml_file, schema_file)
|
5
|
-
schema = Nokogiri::XML::Schema(File.read(schema_file))
|
6
|
-
doc = Nokogiri::XML::Document.parse(File.read(xml_file))
|
7
|
-
|
8
|
-
validation = schema.validate(doc)
|
9
|
-
validation.each do |error|
|
10
|
-
raise error.message
|
11
|
-
end
|
12
|
-
|
13
|
-
return validation.length == 0
|
14
|
-
end
|
15
|
-
end
|
data/spec/support/ziptestdata.rb
DELETED
@@ -1,13 +0,0 @@
|
|
1
|
-
class ZipTestData
|
2
|
-
|
3
|
-
@@folder = File.expand_path(File.join(File.dirname(__FILE__), 'zip'))
|
4
|
-
@@output_folder = File.expand_path(File.join(File.dirname(__FILE__), 'zip_output'))
|
5
|
-
|
6
|
-
def self.folder
|
7
|
-
@@folder
|
8
|
-
end
|
9
|
-
|
10
|
-
def self.output_folder
|
11
|
-
@@output_folder
|
12
|
-
end
|
13
|
-
end
|
data/spec/unzip_spec.rb
DELETED
@@ -1,15 +0,0 @@
|
|
1
|
-
require 'spec_helper'
|
2
|
-
require 'albacore/unzip'
|
3
|
-
|
4
|
-
describe Unzip, "when providing configuration" do
|
5
|
-
let :uz do
|
6
|
-
Albacore.configure do |config|
|
7
|
-
config.unzip.file = "configured"
|
8
|
-
end
|
9
|
-
uz = Unzip.new
|
10
|
-
end
|
11
|
-
|
12
|
-
it "should use the configured values" do
|
13
|
-
uz.file.should == "configured"
|
14
|
-
end
|
15
|
-
end
|
data/spec/xbuild_spec.rb
DELETED
@@ -1,15 +0,0 @@
|
|
1
|
-
require 'spec_helper'
|
2
|
-
require 'albacore/xbuild'
|
3
|
-
|
4
|
-
describe XBuild, "when providing configuration values" do
|
5
|
-
let :xbuild do
|
6
|
-
Albacore.configure do |config|
|
7
|
-
config.xbuild.command = "configured"
|
8
|
-
end
|
9
|
-
xbuild = XBuild.new
|
10
|
-
end
|
11
|
-
|
12
|
-
it "should use the configured values" do
|
13
|
-
xbuild.command.should == "configured"
|
14
|
-
end
|
15
|
-
end
|
data/spec/xunit_spec.rb
DELETED
@@ -1,168 +0,0 @@
|
|
1
|
-
require 'spec_helper'
|
2
|
-
require 'albacore/xunittestrunner'
|
3
|
-
|
4
|
-
shared_examples_for "xunit paths" do
|
5
|
-
before :all do
|
6
|
-
@xunitpath = File.join(File.dirname(__FILE__), 'support', 'Tools', 'XUnit-v1.5', 'xunit.console.exe')
|
7
|
-
@test_assembly = File.join(File.expand_path(File.dirname(__FILE__)), 'support', 'CodeCoverage', 'xunit', 'assemblies', 'TestSolution.XUnitTests.dll')
|
8
|
-
@output_option = "/out=xunit.results.html"
|
9
|
-
@working_dir =File.join(File.dirname(__FILE__), 'support','xunit')
|
10
|
-
@html_output = File.join(@working_dir,'TestSolution.XUnitTests.dll.html')
|
11
|
-
end
|
12
|
-
end
|
13
|
-
|
14
|
-
describe XUnitTestRunner, "the command parameters for an xunit runner" do
|
15
|
-
it_should_behave_like "xunit paths"
|
16
|
-
before :all do
|
17
|
-
xunit = XUnitTestRunner.new(@xunitpath)
|
18
|
-
xunit.assembly = @test_assembly
|
19
|
-
xunit.options @output_option
|
20
|
-
|
21
|
-
@command_parameters = xunit.get_command_parameters
|
22
|
-
end
|
23
|
-
|
24
|
-
it "should not include the path to the command" do
|
25
|
-
@command_parameters.should_not include(@xunitpath)
|
26
|
-
end
|
27
|
-
|
28
|
-
it "should include the list of options" do
|
29
|
-
@command_parameters.should include(@output_option)
|
30
|
-
end
|
31
|
-
end
|
32
|
-
|
33
|
-
describe XUnitTestRunner, "the command line string for an xunit runner" do
|
34
|
-
it_should_behave_like "xunit paths"
|
35
|
-
before :all do
|
36
|
-
xunit = XUnitTestRunner.new(@xunitpath)
|
37
|
-
xunit.assembly = @test_assembly
|
38
|
-
xunit.options @output_option
|
39
|
-
|
40
|
-
@command_line = xunit.get_command_line
|
41
|
-
@command_parameters = xunit.get_command_parameters.join(" ")
|
42
|
-
end
|
43
|
-
|
44
|
-
it "should start with the path to the command" do
|
45
|
-
@command_line.split(" ").first.should == @xunitpath
|
46
|
-
end
|
47
|
-
|
48
|
-
it "should include the command parameters" do
|
49
|
-
@command_line.should include(@command_parameters)
|
50
|
-
end
|
51
|
-
end
|
52
|
-
|
53
|
-
describe XUnitTestRunner, "when configured correctly" do
|
54
|
-
it_should_behave_like "xunit paths"
|
55
|
-
before :all do
|
56
|
-
xunit = XUnitTestRunner.new(@xunitpath)
|
57
|
-
xunit.assembly = @test_assembly
|
58
|
-
xunit.options '/noshadow'
|
59
|
-
xunit.extend(FailPatch)
|
60
|
-
xunit.log_level = :verbose
|
61
|
-
|
62
|
-
xunit.execute
|
63
|
-
end
|
64
|
-
|
65
|
-
it "should execute" do
|
66
|
-
$task_failed.should be_false
|
67
|
-
end
|
68
|
-
end
|
69
|
-
|
70
|
-
describe XUnitTestRunner, "when multiple assemblies are passed to xunit runner" do
|
71
|
-
it_should_behave_like "xunit paths"
|
72
|
-
before :all do
|
73
|
-
xunit = XUnitTestRunner.new(@xunitpath)
|
74
|
-
xunit.assemblies = @test_assembly, @test_assembly
|
75
|
-
xunit.options '/noshadow'
|
76
|
-
xunit.extend(FailPatch)
|
77
|
-
xunit.log_level = :verbose
|
78
|
-
|
79
|
-
xunit.execute
|
80
|
-
end
|
81
|
-
|
82
|
-
it "should execute" do
|
83
|
-
$task_failed.should be_false
|
84
|
-
end
|
85
|
-
end
|
86
|
-
|
87
|
-
describe XUnitTestRunner, "when zero assemblies are passed to xunit runner" do
|
88
|
-
it_should_behave_like "xunit paths"
|
89
|
-
before :all do
|
90
|
-
xunit = XUnitTestRunner.new(@xunitpath)
|
91
|
-
xunit.options '/noshadow'
|
92
|
-
xunit.extend(FailPatch)
|
93
|
-
|
94
|
-
xunit.execute
|
95
|
-
end
|
96
|
-
|
97
|
-
it "should fail" do
|
98
|
-
$task_failed.should be_true
|
99
|
-
end
|
100
|
-
end
|
101
|
-
|
102
|
-
describe XUnitTestRunner, "when html_output is specified" do
|
103
|
-
it_should_behave_like "xunit paths"
|
104
|
-
before :each do
|
105
|
-
FileUtils.mkdir @working_dir unless File.exist?(@working_dir)
|
106
|
-
xunit = XUnitTestRunner.new(@xunitpath)
|
107
|
-
xunit.assembly = @test_assembly
|
108
|
-
xunit.html_output = File.dirname(@html_output)
|
109
|
-
xunit.extend(FailPatch)
|
110
|
-
|
111
|
-
xunit.execute
|
112
|
-
end
|
113
|
-
|
114
|
-
it "should execute" do
|
115
|
-
$task_failed.should be_false
|
116
|
-
end
|
117
|
-
|
118
|
-
it "should write output html" do
|
119
|
-
sleep(2)
|
120
|
-
File.exist?(@html_output).should be_true
|
121
|
-
end
|
122
|
-
|
123
|
-
after:each do
|
124
|
-
FileUtils.rm_r @working_dir if File.exist? @working_dir
|
125
|
-
end
|
126
|
-
end
|
127
|
-
|
128
|
-
describe XUnitTestRunner, "when html_output is not a directory" do
|
129
|
-
it_should_behave_like "xunit paths"
|
130
|
-
before :each do
|
131
|
-
FileUtils.mkdir @working_dir unless File.exist?(@working_dir)
|
132
|
-
strio = StringIO.new
|
133
|
-
xunit = XUnitTestRunner.new(@xunitpath)
|
134
|
-
xunit.log_level = :verbose
|
135
|
-
xunit.log_device = strio
|
136
|
-
xunit.assembly = @test_assembly
|
137
|
-
xunit.html_output = @html_output
|
138
|
-
xunit.extend(FailPatch)
|
139
|
-
|
140
|
-
xunit.execute
|
141
|
-
@log_data = strio.string
|
142
|
-
end
|
143
|
-
|
144
|
-
it "should fail" do
|
145
|
-
$task_failed.should be_true
|
146
|
-
end
|
147
|
-
|
148
|
-
it "should log a message" do
|
149
|
-
@log_data.should include('Directory is required for html_output')
|
150
|
-
end
|
151
|
-
|
152
|
-
after:each do
|
153
|
-
FileUtils.rm_r @working_dir if File.exist? @working_dir
|
154
|
-
end
|
155
|
-
end
|
156
|
-
|
157
|
-
describe XUnitTestRunner, "when providing configuration" do
|
158
|
-
let :xunit do
|
159
|
-
Albacore.configure do |config|
|
160
|
-
config.xunit.command = "configured"
|
161
|
-
end
|
162
|
-
xunit = XUnitTestRunner.new
|
163
|
-
end
|
164
|
-
|
165
|
-
it "should use the configured values" do
|
166
|
-
xunit.command.should == "configured"
|
167
|
-
end
|
168
|
-
end
|
data/spec/yamlconfig_spec.rb
DELETED
@@ -1,49 +0,0 @@
|
|
1
|
-
require 'spec_helper'
|
2
|
-
require 'albacore/albacoretask'
|
3
|
-
|
4
|
-
class ::YamlTest
|
5
|
-
include Albacore::Task
|
6
|
-
attr_accessor :some_name, :another_name, :a_hash, :what_ever
|
7
|
-
end
|
8
|
-
|
9
|
-
describe "when configuring with yaml" do
|
10
|
-
before :all do
|
11
|
-
@yml = YamlTest.new
|
12
|
-
@yml.configure File.join(File.dirname(__FILE__), 'support', 'test.yml')
|
13
|
-
end
|
14
|
-
|
15
|
-
it "should set the value of some_name" do
|
16
|
-
@yml.some_name.should == "some value"
|
17
|
-
end
|
18
|
-
|
19
|
-
it "should create and set the value of another_name" do
|
20
|
-
@yml.another_name.should == "another value"
|
21
|
-
end
|
22
|
-
|
23
|
-
it "should allow hash tables" do
|
24
|
-
@yml.a_hash.length.should == 2
|
25
|
-
@yml.a_hash['name'].should == "value"
|
26
|
-
@yml.a_hash['foo'].should == "bar"
|
27
|
-
end
|
28
|
-
|
29
|
-
it "should allow symbols" do
|
30
|
-
@yml.what_ever.should == :a_symbol
|
31
|
-
end
|
32
|
-
end
|
33
|
-
|
34
|
-
describe "when specifying a yaml config folder and configuring" do
|
35
|
-
class ::YAML_AutoConfig_Test
|
36
|
-
include Albacore::Task
|
37
|
-
attr_accessor :some_attribute
|
38
|
-
end
|
39
|
-
|
40
|
-
before :all do
|
41
|
-
Albacore.configure.yaml_config_folder = File.join(File.dirname(__FILE__), 'support', 'yamlconfig')
|
42
|
-
@yamltest = YAML_AutoConfig_Test.new
|
43
|
-
@yamltest.load_config_by_task_name("yaml_autoconfig_test")
|
44
|
-
end
|
45
|
-
|
46
|
-
it "should automatically configure the class from the yaml file in the specified folder" do
|
47
|
-
@yamltest.some_attribute.should == "this value was loaded from a folder, specified by Albacore.configure.yaml_config_folder"
|
48
|
-
end
|
49
|
-
end
|