diff options
Diffstat (limited to 'spec')
-rw-r--r-- | spec/spec_helper.rb | 1 | ||||
-rw-r--r-- | spec/support/manpages.rb | 13 | ||||
-rw-r--r-- | spec/support/rubygems_ext.rb | 4 |
3 files changed, 17 insertions, 1 deletions
diff --git a/spec/spec_helper.rb b/spec/spec_helper.rb index 297d81f531..0a6b696fe7 100644 --- a/spec/spec_helper.rb +++ b/spec/spec_helper.rb @@ -40,6 +40,7 @@ end $debug = false +Spec::Manpages.setup Spec::Rubygems.setup FileUtils.rm_rf(Spec::Path.gem_repo1) ENV["RUBYOPT"] = "#{ENV["RUBYOPT"]} -r#{Spec::Path.root}/spec/support/hax.rb" diff --git a/spec/support/manpages.rb b/spec/support/manpages.rb new file mode 100644 index 0000000000..f6a4a4ab51 --- /dev/null +++ b/spec/support/manpages.rb @@ -0,0 +1,13 @@ +# frozen_string_literal: true +module Spec + module Manpages + def self.setup + man_path = Spec::Path.root.join("man") + return if man_path.children(false).select {|file| file.extname == ".ronn" }.all? do |man| + Dir[man_path.join("#{man.to_s[0..-6]}*.txt").to_s].any? + end + + system(Spec::Path.root.join("bin", "rake").to_s, "man:build") || raise("Failed building man pages") + end + end +end diff --git a/spec/support/rubygems_ext.rb b/spec/support/rubygems_ext.rb index 88886c3f1f..cfc481ef83 100644 --- a/spec/support/rubygems_ext.rb +++ b/spec/support/rubygems_ext.rb @@ -8,7 +8,9 @@ module Spec deps = { # rack 2.x requires Ruby version >= 2.2.2. # artifice doesn't support rack 2.x now. - "rack" => "< 2", + # TODO: revert to `< 2` once https://github.com/rack/rack/issues/1168 is + # addressed + "rack" => "1.6.6", "artifice" => "~> 0.6.0", "compact_index" => "~> 0.11.0", "sinatra" => "~> 1.4.7", |