From 28798c7a34bab72347f27372f8efc608c274deb2 Mon Sep 17 00:00:00 2001
From: Kohei Suzuki <eagletmt@gmail.com>
Date: Sat, 2 Jul 2016 17:00:44 +0900
Subject: [PATCH] Fix test failures due to Rack 2.x
- Rack 2.x requires Ruby version >= 2.2.2
- artifice doesn't support rack 2.x now.
---
spec/support/rubygems_ext.rb | 7 +++++--
1 file changed, 5 insertions(+), 2 deletions(-)
diff --git a/spec/support/rubygems_ext.rb b/spec/support/rubygems_ext.rb
index 95f596e..862be3d 100644
--- a/spec/support/rubygems_ext.rb
+++ b/spec/support/rubygems_ext.rb
@@ -6,7 +6,10 @@ module Spec
module Rubygems
DEPS = begin
deps = {
- "fakeweb artifice rack compact_index" => nil,
+ # rack 2.x requires Ruby version >= 2.2.2.
+ # artifice doesn't support rack 2.x now.
+ "rack" => "< 2",
+ "fakeweb artifice compact_index" => nil,
"sinatra" => "1.2.7",
# Rake version has to be consistent for tests to pass
"rake" => "10.0.2",
@@ -43,7 +46,7 @@ def self.setup
def self.install_gem(name, version = nil)
cmd = "gem install #{name} --no-rdoc --no-ri"
- cmd += " --version #{version}" if version
+ cmd += " --version '#{version}'" if version
system(cmd) || raise("Installing gem #{name} for the tests to use failed!")
end