You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@buildr.apache.org by to...@apache.org on 2010/06/29 22:40:50 UTC

svn commit: r959094 - /buildr/trunk/spec/spec_helpers.rb

Author: toulmean
Date: Tue Jun 29 20:40:50 2010
New Revision: 959094

URL: http://svn.apache.org/viewvc?rev=959094&view=rev
Log:
make sure to only require runtime dependencies in spec_helpers

Modified:
    buildr/trunk/spec/spec_helpers.rb

Modified: buildr/trunk/spec/spec_helpers.rb
URL: http://svn.apache.org/viewvc/buildr/trunk/spec/spec_helpers.rb?rev=959094&r1=959093&r2=959094&view=diff
==============================================================================
--- buildr/trunk/spec/spec_helpers.rb (original)
+++ buildr/trunk/spec/spec_helpers.rb Tue Jun 29 20:40:50 2010
@@ -23,7 +23,7 @@ unless defined?(SpecHelpers)
   # For testing we use the gem requirements specified on the buildr.gemspec
   spec = Gem::Specification.load(File.expand_path('../buildr.gemspec', File.dirname(__FILE__)))
   # Dependency.version_requirements deprecated in rubygems 1.3.6
-  spec.dependencies.each { |dep| gem dep.name, (dep.respond_to?(:requirement) ? dep.requirement.to_s : dep.version_requirements.to_s) }
+  spec.dependencies.select {|dep| dep.type == :runtime }.each { |dep| gem dep.name, (dep.respond_to?(:requirement) ? dep.requirement.to_s : dep.version_requirements.to_s) }
   
   # Make sure to load from these paths first, we don't want to load any
   # code from Gem library.