Sha256: f887d5b83cdd8033c5ef0273435f021d408d93252881a9193c95312dd15c27a9
Contents?: true
Size: 1.03 KB
Versions: 60
Compression:
Stored size: 1.03 KB
Contents
require 'spec_helper' require 'puppet/application/help' describe "puppet help" do let(:app) { Puppet::Application[:help] } it "generates global help" do expect { app.run }.to exit_with(0) .and output(Regexp.new(Regexp.escape(<<~END), Regexp::MULTILINE)).to_stdout Usage: puppet <subcommand> [options] <action> [options] Available subcommands: END end Puppet::Face.faces.sort.each do |face_name| context "for #{face_name}" do it "generates help" do app.command_line.args = ['help', face_name] expect { app.run }.to exit_with(0) .and output(/USAGE: puppet #{face_name} <action>/).to_stdout end Puppet::Face[face_name, :current].actions.sort.each do |action_name| it "for action #{action_name}" do app.command_line.args = ['help', face_name, action_name] expect { app.run }.to exit_with(0) .and output(/USAGE: puppet #{face_name}/).to_stdout end end end end end
Version data entries
60 entries across 60 versions & 1 rubygems