@@ -4,12 +4,13 @@ module Travis
       class Test
         class Scala < Test
           class Config < Hashr
-            define :scala => '2.9.1'
+            define :scala => 'undefined'
           end
 
           def setup
             super
-            shell.echo("Using Scala #{config.scala}")
+            # Tell what version of Scala is expected (or display 'undefined' if managed by build tool)
+            shell.echo("Expect to run tests with Scala version '#{config.scala}'")
           end
 
           def install
module Travis
  class Build
    module Job
      class Test
        class Scala < Test
          class Config < Hashr
            define :scala => '2.9.1'
          end

          def setup
            super
            shell.echo("Using Scala #{config.scala}")
          end

          def install
            # return nil by default, because sbt (with the help of Apache Ivy)
            # automagically handle unmanaged and managed dependencies
          end

          def script
            if uses_sbt?
              "sbt ++#{config.scala} test"
            else
              "mvn test"
            end
          end

          protected

            def uses_sbt?
              @uses_sbt ||= (shell.directory_exists?('project') || shell.file_exists?('build.sbt'))
            end

            def export_environment_variables
              # export expected Scala version in an environment variable as helper
              # for cross-version build in custom scripts (ant, maven, local sbt,...)
              shell.export_line("SCALA_VERSION=#{config.scala}")
              shell.export_line("TRAVIS_SCALA_VERSION=#{config.scala}")
            end
        end
      end
    end
  end
end

Should we find a better naming ? I think it's not so bad...