Skip to content

Commit

Permalink
setup task dependencies correctly
Browse files Browse the repository at this point in the history
  • Loading branch information
Derick Bailey committed Jun 1, 2010
1 parent caf57ab commit 45ef6c1
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 13 deletions.
10 changes: 4 additions & 6 deletions rakefile.rb
Original file line number Diff line number Diff line change
Expand Up @@ -3,32 +3,30 @@
require 'albacore'
require 'folders'

task :default => [:setup, :build, :build_tests, :test]

Albacore::log_level = :verbose
task :default => [:test]

task :setup do
FileUtils.mkdir @folders[:outdir] unless File.exist? @folders[:outdir]
FileUtils.rm_f("#{@folders[:outdir]}/**/*")
FileUtils.cp(@files[:nunitframework], @folders[:outdir])
end

csc :build do |csc|
csc :build => [:setup] do |csc|
csc.command = @commands[:csc]
csc.compile FileList["src/**/*.cs"].exclude("src/**/*Specs.cs")
csc.output = @files[:output]
csc.target = :library
end

csc :build_tests do |csc|
csc :build_tests => [:build] do |csc|
csc.command = @commands[:csc]
csc.compile FileList["src/**/*Specs.cs"]
csc.output = @files[:testdll]
csc.target = :library
csc.references @files[:output], @files[:nunitframework]
end

nunit :test do |nunit|
nunit :test => [:build_tests] do |nunit|
nunit.command = @commands[:nunit]
nunit.assemblies @files[:testdll]
end
9 changes: 2 additions & 7 deletions watchrtesting.rb
Original file line number Diff line number Diff line change
@@ -1,8 +1,3 @@
watch("lib/albacore/.*\.rb") { |md|
file = File.basename(md[0], ".rb")
system "spec spec/#{file}_spec.rb"
}

watch("spec/.*_spec\.rb") { |md|
system "spec #{md[0]}"
watch("src/.*\.cs") { |md|
system "rake test"
}

0 comments on commit 45ef6c1

Please sign in to comment.