mirror of
https://github.com/inspec/inspec
synced 2025-02-17 14:38:43 +00:00
Add cli to list of valid types explicitly to fix unit tests
Signed-off-by: Clinton Wolfe <clintoncwolfe@gmail.com>
This commit is contained in:
parent
458a5c4410
commit
afdcc9d2a1
1 changed files with 6 additions and 1 deletions
|
@ -355,7 +355,12 @@ module Inspec
|
||||||
.find_activators(plugin_type: :reporter)\
|
.find_activators(plugin_type: :reporter)\
|
||||||
.map(&:activator_name).map(&:to_s)
|
.map(&:activator_name).map(&:to_s)
|
||||||
|
|
||||||
valid_types = rspec_built_in_formatters + inspec_reporters_that_are_not_yet_plugins + plugin_reporters
|
# Include CLI explicitly, because it is the default reporter and will usually not be
|
||||||
|
# present on the command line, and thus its plugin will not appear on the list.
|
||||||
|
valid_types = rspec_built_in_formatters + \
|
||||||
|
inspec_reporters_that_are_not_yet_plugins + \
|
||||||
|
plugin_reporters + \
|
||||||
|
[ "cli" ]
|
||||||
|
|
||||||
reporters.each do |reporter_name, reporter_config|
|
reporters.each do |reporter_name, reporter_config|
|
||||||
raise NotImplementedError, "'#{reporter_name}' is not a valid reporter type." unless valid_types.include?(reporter_name)
|
raise NotImplementedError, "'#{reporter_name}' is not a valid reporter type." unless valid_types.include?(reporter_name)
|
||||||
|
|
Loading…
Add table
Reference in a new issue