You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@buildr.apache.org by to...@apache.org on 2010/07/20 17:03:03 UTC
svn commit: r965869 - in /buildr/trunk: CHANGELOG
lib/buildr/java/cobertura.rb spec/java/cobertura_spec.rb
Author: toulmean
Date: Tue Jul 20 15:03:03 2010
New Revision: 965869
URL: http://svn.apache.org/viewvc?rev=965869&view=rev
Log:
fix for BUILDR-163 cobertura-check
Modified:
buildr/trunk/CHANGELOG
buildr/trunk/lib/buildr/java/cobertura.rb
buildr/trunk/spec/java/cobertura_spec.rb
Modified: buildr/trunk/CHANGELOG
URL: http://svn.apache.org/viewvc/buildr/trunk/CHANGELOG?rev=965869&r1=965868&r2=965869&view=diff
==============================================================================
--- buildr/trunk/CHANGELOG (original)
+++ buildr/trunk/CHANGELOG Tue Jul 20 15:03:03 2010
@@ -3,11 +3,12 @@
* Change: BUILDR-473 Update jruby-openssl dependency version or support a range of versions
* Change: BUILDR-478 Upgrade to net-ssh 2.0.23 and net-sftp 2.0.4 (Shane Witbeck)
* Change: BUILDR-475 Support for long names on tar.gz (updated to minitar 0.5.3)
-* Fixed: BUILDR-302 Move out-of-date Nailgun documentation to wiki (Shane Witbeck)
* Fixed: BUILDR-144 Filter does not preserve file permissions
+* Fixed: BUILDR-163 cobertura-check
* Fixed: BUILDR-203 Compiler guessing very inefficient
* Fixed: BUILDR-225 ArchiveTask#merge, not according to doc
* Fixed: BUILDR-256 Automatically installing gems aborts rspec test runner (Rhett Sutphin)
+* Fixed: BUILDR-302 Move out-of-date Nailgun documentation to wiki (Shane Witbeck)
* Fixed: BUILDR-317 ecj compiler
* Fixed: BUILDR-326 follow up: binary safe untarring on Windows (Sam Hendley)
* Fixed: BUILDR-342 The jruby gem installer invokes the removed Gem.manage_gems function (Rhett Sutphin)
Modified: buildr/trunk/lib/buildr/java/cobertura.rb
URL: http://svn.apache.org/viewvc/buildr/trunk/lib/buildr/java/cobertura.rb?rev=965869&r1=965868&r2=965869&view=diff
==============================================================================
--- buildr/trunk/lib/buildr/java/cobertura.rb (original)
+++ buildr/trunk/lib/buildr/java/cobertura.rb Tue Jul 20 15:03:03 2010
@@ -223,8 +223,7 @@ module Buildr
task :check => [:instrument, :test] do
Buildr.ant "cobertura" do |ant|
- ant.taskdef :classpath=>Cobertura.requires.join(File::PATH_SEPARATOR), :resource=>"tasks.properties"
-
+ ant.taskdef :classpath=>Cobertura.dependencies.join(File::PATH_SEPARATOR), :resource=>"tasks.properties"
params = { :datafile => Cobertura.data_file }
# oh so ugly...
Modified: buildr/trunk/spec/java/cobertura_spec.rb
URL: http://svn.apache.org/viewvc/buildr/trunk/spec/java/cobertura_spec.rb?rev=965869&r1=965868&r2=965869&view=diff
==============================================================================
--- buildr/trunk/spec/java/cobertura_spec.rb (original)
+++ buildr/trunk/spec/java/cobertura_spec.rb Tue Jul 20 15:03:03 2010
@@ -80,6 +80,28 @@ describe Buildr::Cobertura do
end
end
- # TODO add specs for cobertura:check...somehow
+ describe 'check' do
+ before do
+ write 'src/main/java/Foo.java', 'public class Foo { public static boolean returnTrue() {return true;}}'
+ write 'src/test/java/FooTest.java', <<-JAVA
+import static junit.framework.Assert.assertTrue;
+import org.junit.Test;
+
+public class FooTest {
+
+ @Test
+ public void testReturnTrue() {
+ assertTrue(Foo.returnTrue());
+ }
+}
+JAVA
+ end
+
+ it 'should not raise errors during execution' do
+ define('foo') { cobertura.include 'Foo' }
+ lambda {task("foo:cobertura:check").invoke}.should_not raise_error
+ end
+
+ end
end
end