You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@buildr.apache.org by do...@apache.org on 2015/02/20 00:38:17 UTC

[3/5] buildr git commit: Make sure the spec helpers load the rspec dependency even though it is marked as a developer dependency

Make sure the spec helpers load the rspec dependency even though it is marked as a developer dependency


Project: http://git-wip-us.apache.org/repos/asf/buildr/repo
Commit: http://git-wip-us.apache.org/repos/asf/buildr/commit/c3c859cb
Tree: http://git-wip-us.apache.org/repos/asf/buildr/tree/c3c859cb
Diff: http://git-wip-us.apache.org/repos/asf/buildr/diff/c3c859cb

Branch: refs/heads/master
Commit: c3c859cb6c12ca0dd42ff7e5e8de1217dccb524d
Parents: b359ca4
Author: Peter Donald <pe...@realityforge.org>
Authored: Sat Feb 14 20:30:46 2015 +1100
Committer: Peter Donald <pe...@realityforge.org>
Committed: Sat Feb 14 20:30:46 2015 +1100

----------------------------------------------------------------------
 spec/spec_helpers.rb | 4 +++-
 1 file changed, 3 insertions(+), 1 deletion(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/buildr/blob/c3c859cb/spec/spec_helpers.rb
----------------------------------------------------------------------
diff --git a/spec/spec_helpers.rb b/spec/spec_helpers.rb
index abc8243..5ff98d9 100644
--- a/spec/spec_helpers.rb
+++ b/spec/spec_helpers.rb
@@ -23,7 +23,9 @@ 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.select {|dep| dep.type == :runtime }.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 || (dep.type == :development && dep.name.to_s =~ /^rspec.*/) }.
+    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.