You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@buildr.apache.org by la...@apache.org on 2008/10/14 22:14:15 UTC
svn commit: r704660 - in /incubator/buildr/trunk/spec: core/test_spec.rb
java/ant.rb java/java_spec.rb java/tests_spec.rb
Author: lacton
Date: Tue Oct 14 13:14:14 2008
New Revision: 704660
URL: http://svn.apache.org/viewvc?rev=704660&view=rev
Log:
Deprecation tests
Modified:
incubator/buildr/trunk/spec/core/test_spec.rb
incubator/buildr/trunk/spec/java/ant.rb
incubator/buildr/trunk/spec/java/java_spec.rb
incubator/buildr/trunk/spec/java/tests_spec.rb
Modified: incubator/buildr/trunk/spec/core/test_spec.rb
URL: http://svn.apache.org/viewvc/incubator/buildr/trunk/spec/core/test_spec.rb?rev=704660&r1=704659&r2=704660&view=diff
==============================================================================
--- incubator/buildr/trunk/spec/core/test_spec.rb (original)
+++ incubator/buildr/trunk/spec/core/test_spec.rb Tue Oct 14 13:14:14 2008
@@ -115,7 +115,7 @@
test_task.dependencies.should include(File.expand_path('test.jar'))
test_task.dependencies.should include(artifact('acme:example:jar:1.0'))
end
-
+
it 'should response to :options and return test framework options' do
test_task.using :foo=>'bar'
test_task.options[:foo].should eql('bar')
@@ -131,6 +131,13 @@
test_task.options[:bar].should eql('BAR')
end
+ it 'should respond to :using with deprecated parameter style and set value options to true, up to version 1.5 since this usage was deprecated in version 1.3' do
+ Buildr::VERSION.should < '1.5'
+ test_task.using('foo', 'bar')
+ test_task.options[:foo].should eql(true)
+ test_task.options[:bar].should eql(true)
+ end
+
it 'should start without pre-selected test framework' do
test_task.framework.should be_nil
end
Modified: incubator/buildr/trunk/spec/java/ant.rb
URL: http://svn.apache.org/viewvc/incubator/buildr/trunk/spec/java/ant.rb?rev=704660&r1=704659&r2=704660&view=diff
==============================================================================
--- incubator/buildr/trunk/spec/java/ant.rb (original)
+++ incubator/buildr/trunk/spec/java/ant.rb Tue Oct 14 13:14:14 2008
@@ -24,5 +24,10 @@
write 'build.yaml', 'ant: 1.2.3'
Buildr::Ant.dependencies.should include("org.apache.ant:ant:jar:1.2.3")
end
+
+ it 'should have REQUIRES up to version 1.5 since it was deprecated in version 1.3.3' do
+ Buildr::VERSION.should < '1.5'
+ lambda { Ant::REQUIRES }.should_not raise_error
+ end
end
Modified: incubator/buildr/trunk/spec/java/java_spec.rb
URL: http://svn.apache.org/viewvc/incubator/buildr/trunk/spec/java/java_spec.rb?rev=704660&r1=704659&r2=704660&view=diff
==============================================================================
--- incubator/buildr/trunk/spec/java/java_spec.rb (original)
+++ incubator/buildr/trunk/spec/java/java_spec.rb Tue Oct 14 13:14:14 2008
@@ -85,4 +85,12 @@
after do
ENV['JAVA_HOME'] = @old_home
end
-end
\ No newline at end of file
+end
+
+
+describe Java::JavaWrapper do
+ it 'should be removed in version 1.5 since it was deprecated in version 1.3' do
+ Buildr::VERSION.should < '1.5'
+ lambda { Java::JavaWrapper }.should_not raise_error
+ end
+end
Modified: incubator/buildr/trunk/spec/java/tests_spec.rb
URL: http://svn.apache.org/viewvc/incubator/buildr/trunk/spec/java/tests_spec.rb?rev=704660&r1=704659&r2=704660&view=diff
==============================================================================
--- incubator/buildr/trunk/spec/java/tests_spec.rb (original)
+++ incubator/buildr/trunk/spec/java/tests_spec.rb Tue Oct 14 13:14:14 2008
@@ -40,6 +40,11 @@
project('foo').test.dependencies.should include(artifact("junit:junit:jar:#{JUnit.version}"))
end
+ it 'should have REQUIRES up to version 1.5 since it was deprecated in 1.3.3' do
+ Buildr::VERSION.should < '1.5'
+ lambda { JUnit::REQUIRES }.should_not raise_error
+ end
+
it 'should pick JUnit version from junit build settings' do
Buildr::JUnit.instance_eval { @dependencies = nil }
write 'build.yaml', 'junit: 1.2.3'