You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@buildr.apache.org by bo...@apache.org on 2010/09/19 01:40:43 UTC
svn commit: r998567 - in /buildr/trunk/spec: java/external_spec.rb
scala/compiler_spec.rb
Author: boisvert
Date: Sat Sep 18 23:40:43 2010
New Revision: 998567
URL: http://svn.apache.org/viewvc?rev=998567&view=rev
Log:
More spec fixes for --trace changes
Modified:
buildr/trunk/spec/java/external_spec.rb
buildr/trunk/spec/scala/compiler_spec.rb
Modified: buildr/trunk/spec/java/external_spec.rb
URL: http://svn.apache.org/viewvc/buildr/trunk/spec/java/external_spec.rb?rev=998567&r1=998566&r2=998567&view=diff
==============================================================================
--- buildr/trunk/spec/java/external_spec.rb (original)
+++ buildr/trunk/spec/java/external_spec.rb Sat Sep 18 23:40:43 2010
@@ -21,18 +21,20 @@ COMPILERS_WITHOUT_JAVAC = COMPILERS.dup
COMPILERS_WITHOUT_JAVAC.delete Buildr::Compiler::Javac
describe Buildr::Compiler::ExternalJavac do
-
+
before(:all) do
Buildr::Compiler.send :compilers=, COMPILERS_WITHOUT_JAVAC
end
-
- describe "should compile a Java project just in the same way javac does" do
+
+ describe "should compile a Java project just in the same way javac does" do
javac_spec = File.read(File.join(File.dirname(__FILE__), "compiler_spec.rb"))
javac_spec = javac_spec.match(Regexp.escape("require File.expand_path(File.join(File.dirname(__FILE__), '..', 'spec_helpers'))\n")).post_match
javac_spec.gsub!("javac", "externaljavac")
+ javac_spec.gsub!("--trace=externaljavac", "--trace=javac")
+ javac_spec.gsub!("trace_categories = [:externaljavac]", "trace_categories = [:javac]")
eval(javac_spec)
end
-
+
it "should accept a :jvm option as JAVA_HOME" do
write 'src/main/java/Foo.java', 'public class Foo {}'
define "foo" do
@@ -44,11 +46,11 @@ describe Buildr::Compiler::ExternalJavac
end
trace false
end
-
+
after :all do
Buildr::Compiler.send :compilers=, COMPILERS
end
-
+
end
Modified: buildr/trunk/spec/scala/compiler_spec.rb
URL: http://svn.apache.org/viewvc/buildr/trunk/spec/scala/compiler_spec.rb?rev=998567&r1=998566&r2=998567&view=diff
==============================================================================
--- buildr/trunk/spec/scala/compiler_spec.rb (original)
+++ buildr/trunk/spec/scala/compiler_spec.rb Sat Sep 18 23:40:43 2010
@@ -18,12 +18,12 @@ require File.expand_path(File.join(File.
# need to test both with and without SCALA_HOME
share_as :ScalacCompiler do
-
+
before(:each) do
# Force Scala 2.8.0 for specs; don't want to rely on SCALA_HOME
Buildr.settings.build['scala.version'] = "2.8.0"
end
-
+
it 'should identify itself from source directories' do
write 'src/main/scala/com/example/Test.scala', 'package com.example; class Test { val i = 1 }'
define('foo').compile.compiler.should eql(:scalac)
@@ -176,8 +176,8 @@ describe 'scalac compiler options' do
scalac_args.should_not include('-verbose')
end
- it 'should use -verbose argument when running with --trace option' do
- trace true
+ it 'should use -verbose argument when running with --trace=scalac option' do
+ Buildr.application.options.trace_categories = [:scalac]
scalac_args.should include('-verbose')
end