Author: boisvert
Date: Fri Jun 17 19:40:41 2011
New Revision: 1137003

URL: http://svn.apache.org/viewvc?rev=1137003&view=rev
Log:
BUILDR-587 ScalaTest uses deprecated reporter parameters
and upgrade to ScalaTest 1.6.1 as default.

Modified:
    buildr/trunk/CHANGELOG
    buildr/trunk/lib/buildr/scala/tests.rb
    buildr/trunk/spec/sandbox.rb
    buildr/trunk/spec/scala/tests_spec.rb

Modified: buildr/trunk/CHANGELOG
URL: 
http://svn.apache.org/viewvc/buildr/trunk/CHANGELOG?rev=1137003&r1=1137002&r2=1137003&view=diff
==============================================================================
--- buildr/trunk/CHANGELOG (original)
+++ buildr/trunk/CHANGELOG Fri Jun 17 19:40:41 2011
@@ -1,7 +1,7 @@
 1.4.6 (Pending)
 * Added:  Support for Scala 2.9.0+ (with help of Alexis Midon)
-* Change: Scala 2.9.0-1 is now default, along with ScalaCheck 1.9, ScalaTest 
1.4.1
-          and Specs 1.6.8. 
+* Change: Scala 2.9.0-1 is now default, along with ScalaCheck 1.9, ScalaTest 
1.6.1
+          and Specs 1.6.8.
 * Change: ScalaCheck, ScalaTest and Specs now default to sane versions when 
using
           older Scala versions.
 * Fixed:  BUILDR-583 Update jruby install to use jruby version 1.6.1 (Alexis 
Midon)
@@ -13,13 +13,14 @@
           (Jean-Philippe Caruana)
 * Change: BUILDR-576 Upgrade to JUnit 4.8.2
 * Chnage: Upgrade to JRuby 1.6.2
-* Fixed:  BUILDR-571 Generated IDEA projects include resources multiple times 
(Peter Royal) 
+* Fixed:  BUILDR-571 Generated IDEA projects include resources multiple times 
(Peter Royal)
 * Fixed:  BUILDR-573 HTTP upload PUT request with incorrect Content-Type 
(Mathias Doenitz)
 * Fixed:  BUILDR-578 Tar task does not preserve uid/gid on folders 
(Jean-Philippe Caruana)
 * Fixed:  BUILDR-251 Classifier not handled when downloading snapshot 
artifacts (Ryan Fowler)
 * Fixed:  BUILDR-585 "TypeError : can't dup NilClass" when merging jars
 * Fixed:  BUILDR-586 ScalaTest uses deprecated ant task (Martin Partel)
 * Fixed:  BUILDR-584 eclipse plugin should use absolute path
+* Fixed:  BUILDR-587 ScalaTest uses deprecated reporter parameters
 
 1.4.5 (2011-02-20)
 * Added:  BUILDR-555 Add support for the jaxb binding compiler (Mark Petrovic)

Modified: buildr/trunk/lib/buildr/scala/tests.rb
URL: 
http://svn.apache.org/viewvc/buildr/trunk/lib/buildr/scala/tests.rb?rev=1137003&r1=1137002&r2=1137003&view=diff
==============================================================================
--- buildr/trunk/lib/buildr/scala/tests.rb (original)
+++ buildr/trunk/lib/buildr/scala/tests.rb Fri Jun 17 19:40:41 2011
@@ -74,7 +74,7 @@ module Buildr::Scala
   # * :java_args   -- Arguments passed as is to the JVM.
   class ScalaTest < Buildr::TestFramework::Java
 
-    VERSION = Buildr::Scala.version?(2.7, 2.8) ? '1.3' : '1.4.1'
+    VERSION = Buildr::Scala.version?(2.7, 2.8) ? '1.3' : '1.6.1'
 
     class << self
       def version
@@ -128,7 +128,12 @@ module Buildr::Scala
       mkpath task.report_to.to_s
       success = []
 
-      reporter_options = 'TFGBSAR' # testSucceeded, testFailed, testIgnored, 
suiteAborted, runStopped, runAborted, runCompleted
+      reporter_options = if (ScalaTest.version =~ /^0\./)
+        'TFGBSAR' # testSucceeded, testFailed, testIgnored, suiteAborted, 
runStopped, runAborted, runCompleted
+      else
+        ''
+      end
+
       scalatest.each do |suite|
         info "ScalaTest #{suite.inspect}"
         # Use Ant to execute the ScalaTest task, gives us performance and 
reporting.
@@ -137,7 +142,7 @@ module Buildr::Scala
         taskdef = 
Buildr.artifacts(self.class.dependencies).each(&:invoke).map(&:to_s)
         Buildr.ant('scalatest') do |ant|
           # ScalaTestTask was deprecated in 1.2, in favor of ScalaTestAntTask
-          classname = (ScalaTest.version =~ /1\.[01]/) ? \
+          classname = (ScalaTest.version =~ /^1\.[01]/) ? \
             'org.scalatest.tools.ScalaTestTask' : 
'org.scalatest.tools.ScalaTestAntTask'
           ant.taskdef :name=>'scalatest', :classname=>classname,
             :classpath=>taskdef.join(File::PATH_SEPARATOR)

Modified: buildr/trunk/spec/sandbox.rb
URL: 
http://svn.apache.org/viewvc/buildr/trunk/spec/sandbox.rb?rev=1137003&r1=1137002&r2=1137003&view=diff
==============================================================================
--- buildr/trunk/spec/sandbox.rb (original)
+++ buildr/trunk/spec/sandbox.rb Fri Jun 17 19:40:41 2011
@@ -21,6 +21,8 @@ Buildr.application.instance_eval { @rake
 repositories.remote << 'http://repo1.maven.org/maven2'
 repositories.remote << 'http://scala-tools.org/repo-releases'
 
+ENV["SCALA_HOME"] = ''
+
 # Force Scala version for specs; don't want to rely on SCALA_HOME
 module Buildr::Scala
   SCALA_VERSION_FOR_SPECS = ENV["SCALA_VERSION"] || "2.8.1"
@@ -41,6 +43,7 @@ artifacts(
   Buildr::Groovy.dependencies,
   Buildr::JaxbXjc.dependencies,
   Buildr::Bnd.dependencies,
+  Buildr::Scala::Scalac.dependencies,
   Buildr::Scala::Specs.dependencies,
   Buildr::Shell::BeanShell.artifact,
   Buildr::Clojure.dependencies

Modified: buildr/trunk/spec/scala/tests_spec.rb
URL: 
http://svn.apache.org/viewvc/buildr/trunk/spec/scala/tests_spec.rb?rev=1137003&r1=1137002&r2=1137003&view=diff
==============================================================================
--- buildr/trunk/spec/scala/tests_spec.rb (original)
+++ buildr/trunk/spec/scala/tests_spec.rb Fri Jun 17 19:40:41 2011
@@ -31,8 +31,8 @@ describe "scalatest version" do
       Scala::ScalaTest.dependencies.should 
include("org.scalatest:scalatest:jar:1.3")
     end
   when Buildr::Scala.version?(2.9)
-    it 'should be 1.4.1 for scala 2.9' do
-      Scala::ScalaTest.dependencies.should 
include("org.scalatest:scalatest_2.9.0:jar:1.4.1")
+    it 'should be 1.6.1 for scala 2.9' do
+      Scala::ScalaTest.dependencies.should 
include("org.scalatest:scalatest_2.9.0:jar:1.6.1")
     end
   end
 end


Reply via email to