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/13 22:53:25 UTC

svn commit: r704243 - in /incubator/buildr/trunk/spec/core: build_spec.rb compile_spec.rb project_spec.rb

Author: lacton
Date: Mon Oct 13 13:53:25 2008
New Revision: 704243

URL: http://svn.apache.org/viewvc?rev=704243&view=rev
Log:
Deprecation tests (simplified thanks to ruby's awesome string comparator)

Modified:
    incubator/buildr/trunk/spec/core/build_spec.rb
    incubator/buildr/trunk/spec/core/compile_spec.rb
    incubator/buildr/trunk/spec/core/project_spec.rb

Modified: incubator/buildr/trunk/spec/core/build_spec.rb
URL: http://svn.apache.org/viewvc/incubator/buildr/trunk/spec/core/build_spec.rb?rev=704243&r1=704242&r2=704243&view=diff
==============================================================================
--- incubator/buildr/trunk/spec/core/build_spec.rb (original)
+++ incubator/buildr/trunk/spec/core/build_spec.rb Mon Oct 13 13:53:25 2008
@@ -171,7 +171,7 @@
   end
   
   it 'should be removed in version 1.5 since it was deprecated in version 1.3' do
-    Gem::Version.new(Buildr::VERSION).should < Gem::Version.new('1.5')
+    Buildr::VERSION.should < '1.5'
   end
 end
 
@@ -194,6 +194,10 @@
     @project.layout[:reports] = 'baz'
     @project.reports.should eql('baz')
   end
+  
+  it 'should be removed in version 1.5 since it was deprecated in version 1.3' do
+    Buildr::VERSION.should < '1.5'
+  end
 end
 
 

Modified: incubator/buildr/trunk/spec/core/compile_spec.rb
URL: http://svn.apache.org/viewvc/incubator/buildr/trunk/spec/core/compile_spec.rb?rev=704243&r1=704242&r2=704243&view=diff
==============================================================================
--- incubator/buildr/trunk/spec/core/compile_spec.rb (original)
+++ incubator/buildr/trunk/spec/core/compile_spec.rb Mon Oct 13 13:53:25 2008
@@ -197,7 +197,8 @@
     compile_task.dependencies.should == project('bar').packages
   end
 
-  it 'should be accessible as classpath' do
+  it 'should be accessible as classpath up to version 1.5 since it was deprecated in version 1.3' do
+    Buildr::VERSION.should < '1.5'
     lambda { compile_task.classpath = jars }.should change(compile_task, :dependencies).to(jars)
     lambda { compile_task.dependencies = [] }.should change(compile_task, :classpath).to([])
   end

Modified: incubator/buildr/trunk/spec/core/project_spec.rb
URL: http://svn.apache.org/viewvc/incubator/buildr/trunk/spec/core/project_spec.rb?rev=704243&r1=704242&r2=704243&view=diff
==============================================================================
--- incubator/buildr/trunk/spec/core/project_spec.rb (original)
+++ incubator/buildr/trunk/spec/core/project_spec.rb Mon Oct 13 13:53:25 2008
@@ -368,13 +368,17 @@
     define('foo') { define 'bar' }
     scopes.should eql([['foo'], ['foo', 'bar']])
   end
+  
+  it 'should be removed in version 1.5 since it was deprecated in version 1.3' do
+    Buildr::VERSION.should < '1.5'
+  end
 end
 
 
 describe Rake::Task, ' recursive' do
   before do
     @order = []
-    Project.on_define do |project|
+    Project.on_define do |project| # TODO on_define is deprecated
       project.recursive_task('doda') { @order << project.name }
     end
     define('foo') { define('bar') { define('baz') } }