albacore 0.2.0.preview1 → 0.2.0.preview2
Sign up to get free protection for your applications and to get access to all the features.
- data/README.markdown +7 -2
- data/VERSION +1 -1
- data/install_dependencies.rb +1 -1
- data/lib/albacore.rb +6 -17
- data/lib/albacore/albacoretask.rb +43 -0
- data/lib/albacore/assemblyinfo.rb +10 -7
- data/lib/albacore/config/assemblyinfoconfig.rb +4 -12
- data/lib/albacore/config/config.rb +16 -8
- data/lib/albacore/config/cscconfig.rb +2 -7
- data/lib/albacore/config/docuconfig.rb +3 -5
- data/lib/albacore/config/execconfig.rb +4 -11
- data/lib/albacore/config/msbuildconfig.rb +2 -5
- data/lib/albacore/config/mspectestrunnerconfig.rb +15 -0
- data/lib/albacore/config/nantconfig.rb +4 -11
- data/lib/albacore/config/ncoverconsoleconfig.rb +4 -11
- data/lib/albacore/config/ncoverreportconfig.rb +4 -11
- data/lib/albacore/config/ndependconfig.rb +4 -11
- data/lib/albacore/config/netversion.rb +0 -2
- data/lib/albacore/config/nunittestrunnerconfig.rb +14 -0
- data/lib/albacore/config/specflowreportconfig.rb +2 -5
- data/lib/albacore/config/sqlcmdconfig.rb +4 -11
- data/lib/albacore/config/unzipconfig.rb +4 -11
- data/lib/albacore/config/xbuildconfig.rb +4 -11
- data/lib/albacore/config/xunittestrunnerconfig.rb +15 -0
- data/lib/albacore/config/zipdirectoryconfig.rb +15 -0
- data/lib/albacore/csc.rb +31 -5
- data/lib/albacore/docu.rb +2 -3
- data/lib/albacore/exec.rb +3 -5
- data/lib/albacore/msbuild.rb +3 -3
- data/lib/albacore/mspectestrunner.rb +5 -6
- data/lib/albacore/nant.rb +4 -6
- data/lib/albacore/ncoverconsole.rb +4 -6
- data/lib/albacore/ncoverreport.rb +4 -6
- data/lib/albacore/ncoverreports/codecoveragebase.rb +2 -2
- data/lib/albacore/ncoverreports/cyclomaticcomplexity.rb +2 -2
- data/lib/albacore/ncoverreports/fullcoveragereport.rb +0 -8
- data/lib/albacore/ncoverreports/reportfilterbase.rb +2 -2
- data/lib/albacore/ncoverreports/summaryreport.rb +0 -4
- data/lib/albacore/ndepend.rb +4 -6
- data/lib/albacore/nunittestrunner.rb +4 -5
- data/lib/albacore/specflowreport.rb +2 -2
- data/lib/albacore/sqlcmd.rb +33 -11
- data/lib/albacore/support/createtask.rb +30 -0
- data/lib/albacore/support/runcommand.rb +21 -30
- data/lib/albacore/support/updateattributes.rb +13 -0
- data/lib/albacore/unzip.rb +3 -5
- data/lib/albacore/xbuild.rb +5 -6
- data/lib/albacore/xunittestrunner.rb +4 -5
- data/lib/albacore/zipdirectory.rb +5 -6
- data/rakefile.rb +7 -8
- data/spec/albacoremodel_spec.rb +20 -2
- data/spec/assemblyinfo_spec.rb +27 -14
- data/spec/config_spec.rb +17 -2
- data/spec/createtask_spec.rb +51 -28
- data/spec/csc_spec.rb +135 -3
- data/spec/docu_spec.rb +11 -14
- data/spec/exec_spec.rb +1 -1
- data/spec/msbuild_spec.rb +9 -9
- data/spec/nant_spec.rb +4 -4
- data/spec/ncoverconsole_spec.rb +13 -13
- data/spec/ncoverreport_spec.rb +17 -17
- data/spec/ndepend_spec.rb +6 -6
- data/spec/runcommand_spec.rb +22 -3
- data/spec/sqlcmd_spec.rb +154 -12
- data/spec/support/assemblyinfotester.rb +1 -1
- data/spec/support/spec_helper.rb +2 -2
- data/spec/yamlconfig_spec.rb +3 -3
- data/spec/zip_spec.rb +4 -4
- metadata +32 -119
- data/lib/albacore/albacoremodel.rb +0 -28
- data/lib/albacore/config/mspecconfig.rb +0 -21
- data/lib/albacore/config/nunitconfig.rb +0 -20
- data/lib/albacore/config/xunitconfig.rb +0 -22
- data/lib/albacore/config/zipconfig.rb +0 -22
- data/lib/rake/assemblyinfotask.rb +0 -3
- data/lib/rake/csctask.rb +0 -3
- data/lib/rake/docutask.rb +0 -3
- data/lib/rake/exectask.rb +0 -3
- data/lib/rake/msbuildtask.rb +0 -3
- data/lib/rake/mspectask.rb +0 -3
- data/lib/rake/nanttask.rb +0 -3
- data/lib/rake/ncoverconsoletask.rb +0 -3
- data/lib/rake/ncoverreporttask.rb +0 -3
- data/lib/rake/ndependtask.rb +0 -3
- data/lib/rake/nunittask.rb +0 -3
- data/lib/rake/specflowreporttask.rb +0 -3
- data/lib/rake/sqlcmdtask.rb +0 -3
- data/lib/rake/support/albacoretask.rb +0 -30
- data/lib/rake/support/createtask.rb +0 -21
- data/lib/rake/unziptask.rb +0 -3
- data/lib/rake/xbuildtask.rb +0 -7
- data/lib/rake/xunittask.rb +0 -3
- data/lib/rake/ziptask.rb +0 -3
- data/spec/assemblyinfotask_spec.rb +0 -32
- data/spec/csctask_spec.rb +0 -1
- data/spec/docutask_spec.rb +0 -52
- data/spec/exectask_spec.rb +0 -46
- data/spec/msbuildtask_spec.rb +0 -46
- data/spec/mspectask_spec.rb +0 -46
- data/spec/nanttask_spec.rb +0 -46
- data/spec/ncoverconsoletask_spec.rb +0 -46
- data/spec/ncoverreporttask_spec.rb +0 -46
- data/spec/ndependtask_spec.rb +0 -46
- data/spec/nunittask_spec.rb +0 -46
- data/spec/spec.opts +0 -1
- data/spec/specflowreporttask_spec.rb +0 -48
- data/spec/sqlcmdtask_spec.rb +0 -32
- data/spec/support/AssemblyInfo/assemblyinfo.yml +0 -2
- data/spec/support/CodeCoverage/mspec/assemblies/Machine.Specifications.NUnit.dll +0 -0
- data/spec/support/CodeCoverage/mspec/assemblies/Machine.Specifications.dll +0 -0
- data/spec/support/CodeCoverage/mspec/assemblies/TestSolution.MSpecTests.dll +0 -0
- data/spec/support/CodeCoverage/mspec/assemblies/TestSolution.dll +0 -0
- data/spec/support/CodeCoverage/mspec/assemblies/nunit.framework.dll +0 -0
- data/spec/support/CodeCoverage/nunit/assemblies/TestSolution.Tests.dll +0 -0
- data/spec/support/CodeCoverage/nunit/assemblies/TestSolution.dll +0 -0
- data/spec/support/CodeCoverage/nunit/assemblies/nunit.framework.dll +0 -0
- data/spec/support/CodeCoverage/nunit/assemblies/with spaces/TestSolution.Tests.dll +0 -0
- data/spec/support/CodeCoverage/nunit/assemblies/with spaces/TestSolution.dll +0 -0
- data/spec/support/CodeCoverage/nunit/assemblies/with spaces/nunit.framework.dll +0 -0
- data/spec/support/CodeCoverage/nunit/failing_assemblies/TestSolution.FailingTests.dll +0 -0
- data/spec/support/CodeCoverage/nunit/failing_assemblies/nunit.framework.dll +0 -0
- data/spec/support/CodeCoverage/report/coverage.xml +0 -4578
- data/spec/support/CodeCoverage/xunit/assemblies/TestSolution.XUnitTests.dll +0 -0
- data/spec/support/CodeCoverage/xunit/assemblies/TestSolution.dll +0 -0
- data/spec/support/CodeCoverage/xunit/assemblies/xunit.dll +0 -0
- data/spec/support/CodeCoverage/xunit/assemblies/xunit.xml +0 -2306
- data/spec/support/SpecFlow/TechTalk.SpecFlow.dll +0 -0
- data/spec/support/SpecFlow/TestSolution.SpecFlow.dll +0 -0
- data/spec/support/SpecFlow/TestSolution.SpecFlow.pdb +0 -0
- data/spec/support/SpecFlow/TestSolution.dll +0 -0
- data/spec/support/SpecFlow/TestSolution.pdb +0 -0
- data/spec/support/SpecFlow/nunit.framework.dll +0 -0
- data/spec/support/TestSolution/NDependProject.xml +0 -315
- data/spec/support/TestSolution/TestSolution.5.0.ReSharper.user +0 -27
- data/spec/support/TestSolution/TestSolution.FailingTests/FailingTestFixture.cs +0 -19
- data/spec/support/TestSolution/TestSolution.FailingTests/Properties/AssemblyInfo.cs +0 -36
- data/spec/support/TestSolution/TestSolution.FailingTests/TestSolution.FailingTests.csproj +0 -63
- data/spec/support/TestSolution/TestSolution.MSpecTests/Properties/AssemblyInfo.cs +0 -36
- data/spec/support/TestSolution/TestSolution.MSpecTests/SomeSpecTest.cs +0 -18
- data/spec/support/TestSolution/TestSolution.MSpecTests/TestSolution.MSpecTests.csproj +0 -77
- data/spec/support/TestSolution/TestSolution.SpecFlow/OneFeature.feature +0 -8
- data/spec/support/TestSolution/TestSolution.SpecFlow/OneFeature.feature.cs +0 -73
- data/spec/support/TestSolution/TestSolution.SpecFlow/Properties/AssemblyInfo.cs +0 -36
- data/spec/support/TestSolution/TestSolution.SpecFlow/StepDefinition.cs +0 -30
- data/spec/support/TestSolution/TestSolution.SpecFlow/TestSolution.SpecFlow.csproj +0 -84
- data/spec/support/TestSolution/TestSolution.Tests/Properties/AssemblyInfo.cs +0 -36
- data/spec/support/TestSolution/TestSolution.Tests/SomeTestFixture.cs +0 -23
- data/spec/support/TestSolution/TestSolution.Tests/TestSolution.Tests.csproj +0 -69
- data/spec/support/TestSolution/TestSolution.XUnitTests/Class1.cs +0 -19
- data/spec/support/TestSolution/TestSolution.XUnitTests/FailingTestFixture.cs +0 -14
- data/spec/support/TestSolution/TestSolution.XUnitTests/Properties/AssemblyInfo.cs +0 -36
- data/spec/support/TestSolution/TestSolution.XUnitTests/TestSolution.XUnitTests.csproj +0 -70
- data/spec/support/TestSolution/TestSolution.build +0 -25
- data/spec/support/TestSolution/TestSolution.sln +0 -50
- data/spec/support/TestSolution/TestSolution/Class1.cs +0 -17
- data/spec/support/TestSolution/TestSolution/Properties/AssemblyInfo.cs +0 -36
- data/spec/support/TestSolution/TestSolution/TestSolution.csproj +0 -59
- data/spec/support/csc/File1.cs +0 -9
- data/spec/support/csc/File2.cs +0 -9
- data/spec/support/csc/output/ignorethis.txt +0 -1
- data/spec/support/test.yml +0 -4
- data/spec/support/yamlconfig/msbuild.yml +0 -5
- data/spec/support/yamlconfig/yaml_autoconfig_test.yml +0 -1
- data/spec/support/zip/files/subfolder/sub file.txt +0 -1
- data/spec/support/zip/files/testfile.txt +0 -1
- data/spec/xunittask_spec.rb +0 -32
- data/spec/ziptask_spec.rb +0 -33
@@ -1,21 +0,0 @@
|
|
1
|
-
require 'ostruct'
|
2
|
-
require 'albacore/support/openstruct'
|
3
|
-
|
4
|
-
module Configuration
|
5
|
-
module MSpec
|
6
|
-
|
7
|
-
def self.mspecconfig
|
8
|
-
@mspecconfig ||= OpenStruct.new.extend(OpenStructToHash)
|
9
|
-
end
|
10
|
-
|
11
|
-
def mspec
|
12
|
-
config = MSpec.mspecconfig
|
13
|
-
yield(config) if block_given?
|
14
|
-
config
|
15
|
-
end
|
16
|
-
end
|
17
|
-
end
|
18
|
-
|
19
|
-
class Albacore::Configuration
|
20
|
-
include Configuration::MSpec
|
21
|
-
end
|
@@ -1,20 +0,0 @@
|
|
1
|
-
require 'albacore/support/openstruct'
|
2
|
-
|
3
|
-
module Configuration
|
4
|
-
module NUnit
|
5
|
-
@config = OpenStruct.new.extend(OpenStructToHash).extend(NUnit)
|
6
|
-
def self.nunitconfig
|
7
|
-
@config
|
8
|
-
end
|
9
|
-
|
10
|
-
def nunit
|
11
|
-
config = NUnit.nunitconfig
|
12
|
-
yield(config) if block_given?
|
13
|
-
config
|
14
|
-
end
|
15
|
-
end
|
16
|
-
end
|
17
|
-
|
18
|
-
class Albacore::Configuration
|
19
|
-
include Configuration::NUnit
|
20
|
-
end
|
@@ -1,22 +0,0 @@
|
|
1
|
-
require 'ostruct'
|
2
|
-
require 'albacore/support/openstruct'
|
3
|
-
|
4
|
-
module Configuration
|
5
|
-
module XUnit
|
6
|
-
@xunitconfig = OpenStruct.new.extend(OpenStructToHash)
|
7
|
-
|
8
|
-
def self.xunitconfig
|
9
|
-
@xunitconfig
|
10
|
-
end
|
11
|
-
|
12
|
-
def xunit
|
13
|
-
config = XUnit.xunitconfig
|
14
|
-
yield(config) if block_given?
|
15
|
-
config
|
16
|
-
end
|
17
|
-
end
|
18
|
-
end
|
19
|
-
|
20
|
-
class Albacore::Configuration
|
21
|
-
include Configuration::XUnit
|
22
|
-
end
|
@@ -1,22 +0,0 @@
|
|
1
|
-
require 'ostruct'
|
2
|
-
require 'albacore/support/openstruct'
|
3
|
-
|
4
|
-
module Configuration
|
5
|
-
module Zip
|
6
|
-
@zipconfig = OpenStruct.new.extend(OpenStructToHash)
|
7
|
-
|
8
|
-
def self.zipconfig
|
9
|
-
@zipconfig
|
10
|
-
end
|
11
|
-
|
12
|
-
def zip
|
13
|
-
config = Zip.zipconfig
|
14
|
-
yield(config) if block_given?
|
15
|
-
config
|
16
|
-
end
|
17
|
-
end
|
18
|
-
end
|
19
|
-
|
20
|
-
class Albacore::Configuration
|
21
|
-
include Configuration::Zip
|
22
|
-
end
|
data/lib/rake/csctask.rb
DELETED
data/lib/rake/docutask.rb
DELETED
data/lib/rake/exectask.rb
DELETED
data/lib/rake/msbuildtask.rb
DELETED
data/lib/rake/mspectask.rb
DELETED
data/lib/rake/nanttask.rb
DELETED
data/lib/rake/ndependtask.rb
DELETED
data/lib/rake/nunittask.rb
DELETED
data/lib/rake/sqlcmdtask.rb
DELETED
@@ -1,30 +0,0 @@
|
|
1
|
-
require 'rake/tasklib'
|
2
|
-
|
3
|
-
module Albacore
|
4
|
-
class AlbacoreTask < ::Rake::TaskLib
|
5
|
-
attr_accessor :name
|
6
|
-
|
7
|
-
def initialize(name, *args, &block)
|
8
|
-
@block = block
|
9
|
-
args = args.insert(0, name)
|
10
|
-
define name, args
|
11
|
-
end
|
12
|
-
|
13
|
-
def define(name, args)
|
14
|
-
task *args do |task, task_args|
|
15
|
-
@task_args = task_args
|
16
|
-
execute name.to_s
|
17
|
-
end
|
18
|
-
end
|
19
|
-
|
20
|
-
def call_task_block(obj)
|
21
|
-
if !@block.nil?
|
22
|
-
if @block.arity == 1
|
23
|
-
@block.call(obj)
|
24
|
-
else
|
25
|
-
@block.call(obj, @task_args)
|
26
|
-
end
|
27
|
-
end
|
28
|
-
end
|
29
|
-
end
|
30
|
-
end
|
@@ -1,21 +0,0 @@
|
|
1
|
-
def create_task(taskname, task_object_proc, &execute_body)
|
2
|
-
taskclass = :"Albacore_TaskFor_#{taskname}"
|
3
|
-
taskmethod = taskname.to_s.downcase.to_sym
|
4
|
-
|
5
|
-
Object.class_eval(<<-EOF, __FILE__, __LINE__)
|
6
|
-
def #{taskmethod}(name=:#{taskname}, *args, &block)
|
7
|
-
Albacore.const_get("#{taskclass}").new(name, *args, &block)
|
8
|
-
end
|
9
|
-
EOF
|
10
|
-
|
11
|
-
Albacore.class_eval do
|
12
|
-
const_set(taskclass, Class.new(Albacore::AlbacoreTask) do
|
13
|
-
define_method :execute do |name|
|
14
|
-
task_object = task_object_proc.call
|
15
|
-
task_object.load_config_by_task_name(name)
|
16
|
-
call_task_block(task_object)
|
17
|
-
execute_body.call(task_object) unless execute_body.nil?
|
18
|
-
end
|
19
|
-
end)
|
20
|
-
end
|
21
|
-
end
|
data/lib/rake/unziptask.rb
DELETED
data/lib/rake/xbuildtask.rb
DELETED
data/lib/rake/xunittask.rb
DELETED
data/lib/rake/ziptask.rb
DELETED
@@ -1,32 +0,0 @@
|
|
1
|
-
require File.join(File.dirname(__FILE__), 'support', 'spec_helper')
|
2
|
-
require 'albacore/assemblyinfo'
|
3
|
-
require 'rake/assemblyinfotask'
|
4
|
-
require 'fail_patch'
|
5
|
-
|
6
|
-
describe "when running" do
|
7
|
-
before :all do
|
8
|
-
assemblyinfo :assemblyinfo do |asm|
|
9
|
-
asm.extend(FailPatch)
|
10
|
-
@yielded_object = asm
|
11
|
-
end
|
12
|
-
Rake::Task["assemblyinfo"].invoke
|
13
|
-
end
|
14
|
-
|
15
|
-
it "should yield the assembly info api" do
|
16
|
-
@yielded_object.kind_of?(AssemblyInfo).should == true
|
17
|
-
end
|
18
|
-
end
|
19
|
-
|
20
|
-
describe "when execution fails" do
|
21
|
-
before :all do
|
22
|
-
assemblyinfo :failingtask do |asm|
|
23
|
-
asm.extend(FailPatch)
|
24
|
-
asm.fail
|
25
|
-
end
|
26
|
-
Rake::Task["failingtask"].invoke
|
27
|
-
end
|
28
|
-
|
29
|
-
it "should fail the rake task" do
|
30
|
-
$task_failed.should == true
|
31
|
-
end
|
32
|
-
end
|
data/spec/csctask_spec.rb
DELETED
@@ -1 +0,0 @@
|
|
1
|
-
|
data/spec/docutask_spec.rb
DELETED
@@ -1,52 +0,0 @@
|
|
1
|
-
require File.join(File.dirname(__FILE__), 'support', 'spec_helper')
|
2
|
-
require 'albacore/docu'
|
3
|
-
require 'rake/docutask'
|
4
|
-
require 'fail_patch'
|
5
|
-
require 'system_patch'
|
6
|
-
require 'docu_patch'
|
7
|
-
|
8
|
-
describe "when running" do
|
9
|
-
before :all do
|
10
|
-
docu :docu do |d|
|
11
|
-
d.assemblies 'test.dll'
|
12
|
-
d.command_result = true
|
13
|
-
@yielded_object = d
|
14
|
-
end
|
15
|
-
Rake::Task[:docu].invoke
|
16
|
-
end
|
17
|
-
|
18
|
-
it "should yield the docu api" do
|
19
|
-
@yielded_object.kind_of?(Docu).should be_true
|
20
|
-
end
|
21
|
-
end
|
22
|
-
|
23
|
-
describe "when execution fails" do
|
24
|
-
before :all do
|
25
|
-
docu :docu_fail do |d|
|
26
|
-
d.extend(FailPatch)
|
27
|
-
d.assemblies 'test.dll'
|
28
|
-
d.command_result = true
|
29
|
-
d.fail
|
30
|
-
end
|
31
|
-
Rake::Task[:docu_fail].invoke
|
32
|
-
end
|
33
|
-
|
34
|
-
it "should fail the rake task" do
|
35
|
-
$task_failed.should be_true
|
36
|
-
end
|
37
|
-
end
|
38
|
-
|
39
|
-
describe "when task args are used" do
|
40
|
-
before :all do
|
41
|
-
docu :docutask_withargs, [:arg1] do |d, args|
|
42
|
-
d.assemblies 'test.dll'
|
43
|
-
d.command_result = true
|
44
|
-
@args = args
|
45
|
-
end
|
46
|
-
Rake::Task["docutask_withargs"].invoke("test")
|
47
|
-
end
|
48
|
-
|
49
|
-
it "should provide the task args" do
|
50
|
-
@args.arg1.should == "test"
|
51
|
-
end
|
52
|
-
end
|
data/spec/exectask_spec.rb
DELETED
@@ -1,46 +0,0 @@
|
|
1
|
-
require File.join(File.dirname(__FILE__), 'support', 'spec_helper')
|
2
|
-
require 'albacore/exec'
|
3
|
-
require 'rake/exectask'
|
4
|
-
require 'fail_patch'
|
5
|
-
|
6
|
-
describe "when running" do
|
7
|
-
before :all do
|
8
|
-
exec :exec do |t|
|
9
|
-
t.extend(FailPatch)
|
10
|
-
@yielded_object = t
|
11
|
-
end
|
12
|
-
Rake::Task[:exec].invoke
|
13
|
-
end
|
14
|
-
|
15
|
-
it "should yield the exec api" do
|
16
|
-
@yielded_object.kind_of?(Exec).should == true
|
17
|
-
end
|
18
|
-
end
|
19
|
-
|
20
|
-
describe "when execution fails" do
|
21
|
-
before :all do
|
22
|
-
exec :exec_fail do |t|
|
23
|
-
t.extend(FailPatch)
|
24
|
-
@yielded_object = t
|
25
|
-
end
|
26
|
-
Rake::Task[:exec_fail].invoke
|
27
|
-
end
|
28
|
-
|
29
|
-
it "should fail the rake task" do
|
30
|
-
$task_failed.should be_true
|
31
|
-
end
|
32
|
-
end
|
33
|
-
|
34
|
-
describe "when task args are used" do
|
35
|
-
before :all do
|
36
|
-
exec :exectask_withargs, [:arg1] do |exec, args|
|
37
|
-
exec.extend(FailPatch)
|
38
|
-
@args = args
|
39
|
-
end
|
40
|
-
Rake::Task["exectask_withargs"].invoke("test")
|
41
|
-
end
|
42
|
-
|
43
|
-
it "should provide the task args" do
|
44
|
-
@args.arg1.should == "test"
|
45
|
-
end
|
46
|
-
end
|
data/spec/msbuildtask_spec.rb
DELETED
@@ -1,46 +0,0 @@
|
|
1
|
-
require File.join(File.dirname(__FILE__), 'support', 'spec_helper')
|
2
|
-
require 'albacore/msbuild'
|
3
|
-
require 'rake/msbuildtask'
|
4
|
-
require 'fail_patch'
|
5
|
-
|
6
|
-
describe "when running" do
|
7
|
-
before :all do
|
8
|
-
msbuild :msbuild do |t|
|
9
|
-
t.extend(FailPatch)
|
10
|
-
@yielded_object = t
|
11
|
-
end
|
12
|
-
Rake::Task[:msbuild].invoke
|
13
|
-
end
|
14
|
-
|
15
|
-
it "should yield the msbuild api" do
|
16
|
-
@yielded_object.kind_of?(MSBuild).should == true
|
17
|
-
end
|
18
|
-
end
|
19
|
-
|
20
|
-
describe "when execution fails" do
|
21
|
-
before :all do
|
22
|
-
msbuild :msbuild_fail do |t|
|
23
|
-
t.extend(FailPatch)
|
24
|
-
t.fail
|
25
|
-
end
|
26
|
-
Rake::Task[:msbuild_fail].invoke
|
27
|
-
end
|
28
|
-
|
29
|
-
it "should fail the rake task" do
|
30
|
-
$task_failed.should == true
|
31
|
-
end
|
32
|
-
end
|
33
|
-
|
34
|
-
describe "when task args are used" do
|
35
|
-
before :all do
|
36
|
-
msbuild :msbuildtask_withargs, [:arg1] do |t, args|
|
37
|
-
t.extend(FailPatch)
|
38
|
-
@args = args
|
39
|
-
end
|
40
|
-
Rake::Task[:msbuildtask_withargs].invoke("test")
|
41
|
-
end
|
42
|
-
|
43
|
-
it "should provide the task args" do
|
44
|
-
@args.arg1.should == "test"
|
45
|
-
end
|
46
|
-
end
|
data/spec/mspectask_spec.rb
DELETED
@@ -1,46 +0,0 @@
|
|
1
|
-
require File.join(File.dirname(__FILE__), 'support', 'spec_helper')
|
2
|
-
require 'albacore/mspectestrunner'
|
3
|
-
require 'rake/mspectask'
|
4
|
-
require 'fail_patch'
|
5
|
-
|
6
|
-
describe "when running" do
|
7
|
-
before :all do
|
8
|
-
mspec :mspec do |t|
|
9
|
-
t.extend(FailPatch)
|
10
|
-
@yielded_object = t
|
11
|
-
end
|
12
|
-
Rake::Task[:mspec].invoke
|
13
|
-
end
|
14
|
-
|
15
|
-
it "should yield the mspec api" do
|
16
|
-
@yielded_object.kind_of?(MSpecTestRunner).should be_true
|
17
|
-
end
|
18
|
-
end
|
19
|
-
|
20
|
-
describe "when execution fails" do
|
21
|
-
before :all do
|
22
|
-
mspec :mspec_fail do |t|
|
23
|
-
t.extend(FailPatch)
|
24
|
-
t.fail
|
25
|
-
end
|
26
|
-
Rake::Task[:mspec_fail].invoke
|
27
|
-
end
|
28
|
-
|
29
|
-
it "should fail the rake task" do
|
30
|
-
$task_failed.should == true
|
31
|
-
end
|
32
|
-
end
|
33
|
-
|
34
|
-
describe "when task args are used" do
|
35
|
-
before :all do
|
36
|
-
mspec :mspectask_withargs, [:arg1] do |t, args|
|
37
|
-
t.extend(FailPatch)
|
38
|
-
@args = args
|
39
|
-
end
|
40
|
-
Rake::Task[:mspectask_withargs].invoke("test")
|
41
|
-
end
|
42
|
-
|
43
|
-
it "should provide the task args" do
|
44
|
-
@args.arg1.should == "test"
|
45
|
-
end
|
46
|
-
end
|