Author: donaldp
Date: Wed Oct 26 09:45:02 2011
New Revision: 1189095
URL: http://svn.apache.org/viewvc?rev=1189095&view=rev
Log:
Move the invocation of report_to from the task definition time to task
execution time to allow it to be monkey patched
Modified:
buildr/trunk/lib/buildr/java/cobertura.rb
Modified: buildr/trunk/lib/buildr/java/cobertura.rb
URL:
http://svn.apache.org/viewvc/buildr/trunk/lib/buildr/java/cobertura.rb?rev=1189095&r1=1189094&r2=1189095&view=diff
==============================================================================
--- buildr/trunk/lib/buildr/java/cobertura.rb (original)
+++ buildr/trunk/lib/buildr/java/cobertura.rb Wed Oct 26 09:45:02 2011
@@ -262,9 +262,9 @@ module Buildr
end
[:xml, :html].each do |format|
- report_target = report_to(format)
- desc "Run the test cases and produce code coverage reports in
#{report_target}"
+ desc "Run the test cases and produce code coverage reports"
task format => ["instrument", "test"] do
+ report_target = report_to(format)
if Buildr.projects.detect { |project|
!project.compile.sources.empty? }
info "Creating test coverage reports in #{report_target}"
Buildr.ant "cobertura" do |ant|