Skip to content

Commit

Permalink
updated rake file samples to use the new task syntax instead of the e…
Browse files Browse the repository at this point in the history
…xplicit xyzTask.new calls
  • Loading branch information
Derick Bailey committed Dec 3, 2009
1 parent eca370b commit d8aab95
Showing 1 changed file with 9 additions and 9 deletions.
18 changes: 9 additions & 9 deletions rakefile.rb
Original file line number Diff line number Diff line change
Expand Up @@ -116,14 +116,14 @@
'albacore:xunit']

desc "Run a sample build using the MSBuildTask"
Albacore::MSBuildTask.new(:msbuild) do |msb|
Albacore::msbuild do |msb|
msb.properties = {:configuration => :Debug}
msb.targets [:Clean, :Build]
msb.solution = "spec/support/TestSolution/TestSolution.sln"
end

desc "Run a sample assembly info generator"
Albacore::AssemblyInfoTask.new(:assemblyinfo) do |asm|
Albacore::assemblyinfo do |asm|
asm.version = "0.1.2.3"
asm.company_name = "a test company"
asm.product_name = "a product name goes here"
Expand All @@ -136,7 +136,7 @@
end

desc "Run a sample NCover Console code coverage"
Albacore::NCoverConsoleTask.new(:ncoverconsole) do |ncc|
Albacore::ncoverconsole do |ncc|
@xml_coverage = "spec/support/CodeCoverage/test-coverage.xml"
File.delete(@xml_coverage) if File.exist?(@xml_coverage)

Expand All @@ -154,7 +154,7 @@
end

desc "Run a sample NCover Report to check code coverage"
Albacore::NCoverReportTask.new(:ncoverreport => :ncoverconsole) do |ncr|
Albacore::ncoverreport :ncoverreport => :ncoverconsole do |ncr|
@xml_coverage = "spec/support/CodeCoverage/test-coverage.xml"

ncr.path_to_command = "spec/support/Tools/NCover-v3.3/NCover.Reporting.exe"
Expand All @@ -169,35 +169,35 @@
end

desc "Run the sample for renaming a File"
Albacore::RenameTask.new(:rename) do |rename|
Albacore::rename do |rename|
FileUtils.touch 'web.uat.config.example'

rename.actual_name = 'web.uat.config.example'
rename.target_name = 'web.config.example'
end

desc "Run ZipDirectory example"
Albacore::ZipTask.new(:zip) do |zip|
Albacore::zip do |zip|
zip.output_path = File.dirname(__FILE__)
zip.directories_to_zip = ["lib", "spec"]
zip.additional_files = "README.markdown"
zip.file = 'albacore_example.zip'
end

desc "MSpec Test Runner Example"
Albacore::MSpecTask.new(:mspec) do |mspec|
Albacore::mspec do |mspec|
mspec.path_to_command = "spec/support/Tools/Machine.Specification-v0.2/Machine.Specifications.ConsoleRunner.exe"
mspec.assemblies << "spec/support/CodeCoverage/mspec/assemblies/TestSolution.MSpecTests.dll"
end

desc "NUnit Test Runner Example"
Albacore::NUnitTask.new(:nunit) do |nunit|
Albacore::nunit do |nunit|
nunit.path_to_command = "spec/support/Tools/NUnit-v2.5/nunit-console.exe"
nunit.assemblies << "spec/support/CodeCoverage/nunit/assemblies/TestSolution.Tests.dll"
end

desc "XUnit Test Runner Example"
Albacore::XUnitTask.new(:xunit) do |xunit|
Albacore::xunit do |xunit|
xunit.path_to_command = "spec/support/Tools/XUnit-v1.5/xunit.console.exe"
xunit.assemblies << "spec/support/CodeCoverage/xunit/assemblies/TestSolution.XUnitTests.dll"
end
Expand Down

0 comments on commit d8aab95

Please sign in to comment.