Author: vborja
Date: Mon Oct  6 12:40:33 2008
New Revision: 702240

URL: http://svn.apache.org/viewvc?rev=702240&view=rev
Log:
Don't specify an rspec requirement, let JtestR use the version bundled on its 
jar.

Modified:
    incubator/buildr/trunk/lib/buildr/java/bdd.rb
    incubator/buildr/trunk/lib/buildr/java/jtestr_runner.rb.erb

Modified: incubator/buildr/trunk/lib/buildr/java/bdd.rb
URL: 
http://svn.apache.org/viewvc/incubator/buildr/trunk/lib/buildr/java/bdd.rb?rev=702240&r1=702239&r2=702240&view=diff
==============================================================================
--- incubator/buildr/trunk/lib/buildr/java/bdd.rb (original)
+++ incubator/buildr/trunk/lib/buildr/java/bdd.rb Mon Oct  6 12:40:33 2008
@@ -366,8 +366,9 @@
 
     def runner_config
       runner = super
-      runner.gems.update 'rspec' => '>= 1.1.5'
-      runner.requires.unshift 'spec', 'jtestr'
+      # JtestR 0.3.1 comes with rspec 1.1.4 (and any other jtestr dependency) 
included, 
+      # so the rspec version used depends on the jtestr jar.
+      runner.requires.unshift 'jtestr'
       runner
     end
 

Modified: incubator/buildr/trunk/lib/buildr/java/jtestr_runner.rb.erb
URL: 
http://svn.apache.org/viewvc/incubator/buildr/trunk/lib/buildr/java/jtestr_runner.rb.erb?rev=702240&r1=702239&r2=702240&view=diff
==============================================================================
--- incubator/buildr/trunk/lib/buildr/java/jtestr_runner.rb.erb (original)
+++ incubator/buildr/trunk/lib/buildr/java/jtestr_runner.rb.erb Mon Oct  6 
12:40:33 2008
@@ -100,18 +100,6 @@
   argv = <%= runner.rspec.inspect %> || []
   argv.push *<%= tests.inspect %>
   Buildr::TestFramework::TestResult::RSpecResultHandler.init(argv, output, 
output)
-
-  # JtestR uses this method, no longer available on rspec 1.1.5
-  module ::Spec; def self.run=(flag); end; end
-  # JtestR uses a deprecated arity for the example_pending method
-  # rspec 1.1.5 needs it to take three arguments or it will complain
-  # so we override it here
-  class ::JtestR::RSpecResultHandler
-    alias_method :deprecated_example_pending, :example_pending
-    def example_pending(example, message, pending_caller)
-      deprecated_example_pending(example, message)
-    end
-  end
   
   jtestr.run *args
 


Reply via email to