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 2009/11/19 00:14:28 UTC
svn commit: r881992 - in /buildr/trunk: CHANGELOG lib/buildr/core/test.rb
spec/core/test_spec.rb
Author: boisvert
Date: Wed Nov 18 23:14:28 2009
New Revision: 881992
URL: http://svn.apache.org/viewvc?rev=881992&view=rev
Log:
BUILDR-346 Test classpath can not be set (Peter Schröder)
Modified:
buildr/trunk/CHANGELOG
buildr/trunk/lib/buildr/core/test.rb
buildr/trunk/spec/core/test_spec.rb
Modified: buildr/trunk/CHANGELOG
URL: http://svn.apache.org/viewvc/buildr/trunk/CHANGELOG?rev=881992&r1=881991&r2=881992&view=diff
==============================================================================
--- buildr/trunk/CHANGELOG (original)
+++ buildr/trunk/CHANGELOG Wed Nov 18 23:14:28 2009
@@ -25,6 +25,7 @@
* Fixed: BUILDR-344 Buildr::TestFramework::TestResult::YamlFormatter uses
deprecated form of example_pending (Rhett Sutphin)
* Fixed: BUILDR-345 Improve project documentation (Peter Schröder)
+* Fixed: BUILDR-346 Test classpath can not be set (Peter Schröder)
* Fixed: BUILDR-347 Compile.from does not work correctly with FileTask when
no compiler is set (Peter Schröder)
Modified: buildr/trunk/lib/buildr/core/test.rb
URL: http://svn.apache.org/viewvc/buildr/trunk/lib/buildr/core/test.rb?rev=881992&r1=881991&r2=881992&view=diff
==============================================================================
--- buildr/trunk/lib/buildr/core/test.rb (original)
+++ buildr/trunk/lib/buildr/core/test.rb Wed Nov 18 23:14:28 2009
@@ -208,18 +208,18 @@
# The dependencies used for running the tests. Includes the compiled files (compile.target)
# and their dependencies. Will also include anything you pass to #with, shared between the
# testing compile and run dependencies.
- attr_reader :dependencies
+ attr_accessor :dependencies
# *Deprecated*: Use dependencies instead.
def classpath
Buildr.application.deprecated 'Use dependencies instead.'
- dependencies
+ @dependencies
end
# *Deprecated*: Use dependencies= instead.
def classpath=(artifacts)
Buildr.application.deprecated 'Use dependencies= instead.'
- self.dependencies = artifacts
+ @dependencies = artifacts
end
def execute(args) #:nodoc:
Modified: buildr/trunk/spec/core/test_spec.rb
URL: http://svn.apache.org/viewvc/buildr/trunk/spec/core/test_spec.rb?rev=881992&r1=881991&r2=881992&view=diff
==============================================================================
--- buildr/trunk/spec/core/test_spec.rb (original)
+++ buildr/trunk/spec/core/test_spec.rb Wed Nov 18 23:14:28 2009
@@ -109,7 +109,17 @@
test_task.compile.dependencies.should include(File.expand_path('test.jar'))
test_task.compile.dependencies.should include(artifact('acme:example:jar:1.0'))
end
-
+
+ it 'should respond to deprecated classpath' do
+ test_task.classpath = artifact('acme:example:jar:1.0')
+ test_task.classpath.should be(artifact('acme:example:jar:1.0'))
+ end
+
+ it 'should respond to dependencies' do
+ test_task.dependencies = artifact('acme:example:jar:1.0')
+ test_task.dependencies.should be(artifact('acme:example:jar:1.0'))
+ end
+
it 'should respond to :with and add artifacfs to task dependencies' do
test_task.with 'test.jar', 'acme:example:jar:1.0'
test_task.dependencies.should include(File.expand_path('test.jar'))