File tree Expand file tree Collapse file tree 5 files changed +22
-9
lines changed
spec/integration/application Expand file tree Collapse file tree 5 files changed +22
-9
lines changed Original file line number Diff line number Diff line change 15
15
text << Puppet ::Util ::Docs . scrub ( ind . doc ) + "\n \n "
16
16
17
17
Puppet ::Indirector ::Terminus . terminus_classes ( ind . name ) . sort_by ( &:to_s ) . each do |terminus |
18
+ # this is an "abstract" terminus, ignore it
19
+ next if ind . name == :resource && terminus == :validator
20
+
18
21
terminus_name = terminus . to_s
19
22
term_class = Puppet ::Indirector ::Terminus . terminus_class ( ind . name , terminus )
20
23
if term_class
Original file line number Diff line number Diff line change 14
14
15
15
## Available Metaparameters
16
16
17
- }
17
+ } . dup
18
18
begin
19
19
params = [ ]
20
20
Puppet ::Type . eachmetaparam { |param |
Original file line number Diff line number Diff line change 13
13
command_line = Puppet ::Util ::CommandLine . new
14
14
types . reject! { |type | !command_line . args . include? ( type . name . to_s ) } unless command_line . args . empty?
15
15
16
- ret = "Details about this host:\n \n "
16
+ ret = "Details about this host:\n \n " . dup
17
17
18
18
# Throw some facts in there, so we know where the report is from.
19
19
ret << option ( 'Ruby Version' , Facter . value ( 'ruby.version' ) )
Original file line number Diff line number Diff line change 50
50
Resource types define features they can use, and providers can be tested to see
51
51
which features they provide.
52
52
53
- }
53
+ } . dup
54
54
55
55
types . sort_by ( &:to_s ) . each { |name , type |
56
56
str << "
Original file line number Diff line number Diff line change 14
14
. and output ( /configuration - A reference for all settings/ ) . to_stdout
15
15
end
16
16
17
- it 'generates markdown' do
18
- app . command_line . args = [ '-r' , 'report' ]
19
- expect {
20
- app . run
21
- } . to exit_with ( 0 )
22
- . and output ( /# Report Reference/ ) . to_stdout
17
+ {
18
+ 'configuration' => /# Configuration Reference/ ,
19
+ 'function' => /# Function Reference/ ,
20
+ 'indirection' => /# Indirection Reference/ ,
21
+ 'metaparameter' => /# Metaparameter Reference/ ,
22
+ 'providers' => /# Provider Suitability Report/ ,
23
+ 'report' => /# Report Reference/ ,
24
+ 'type' => /# Type Reference/
25
+ } . each_pair do |type , expected |
26
+ it "generates #{ type } reference" do
27
+ app . command_line . args = [ '-r' , type ]
28
+ expect {
29
+ app . run
30
+ } . to exit_with ( 0 )
31
+ . and output ( expected ) . to_stdout
32
+ end
23
33
end
24
34
end
You can’t perform that action at this time.
0 commit comments