summaryrefslogtreecommitdiff
path: root/spec/support/manpages.rb
blob: e3031ca4a445afcdc9a8224ca09e7dd637f4b3c2 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
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|
        man_path.join(man).sub_ext(".txt").file?
      end

      system(Spec::Path.root.join("bin", "rake").to_s, "man:build") || raise("Failed building man pages")
    end
  end
end