mirror of
https://github.com/inspec/inspec
synced 2024-11-27 07:00:39 +00:00
Minor code-review change to ControlEvalContext
- Add comment describing describe - Fixup to_s output to be more accurate Signed-off-by: Steven Danna <steve@chef.io>
This commit is contained in:
parent
9bb65bd60c
commit
30a23b1b85
1 changed files with 7 additions and 1 deletions
|
@ -60,7 +60,7 @@ module Inspec
|
|||
end
|
||||
|
||||
def to_s
|
||||
"Profile Context Run #{profile_name}"
|
||||
"Control Evaluation Context (#{profile_name})"
|
||||
end
|
||||
|
||||
define_method :profile_name do
|
||||
|
@ -73,6 +73,12 @@ module Inspec
|
|||
register_control(rule_class.new(id, profile_id, opts, &block))
|
||||
end
|
||||
|
||||
#
|
||||
# Describe allows users to write rspec-like bare describe
|
||||
# blocks without declaring an inclosing control. Here, we
|
||||
# generate a control for them automatically and then execute
|
||||
# the describe block in the context of that control.
|
||||
#
|
||||
define_method :describe do |*args, &block|
|
||||
loc = block_location(block, caller[0])
|
||||
id = "(generated from #{loc} #{SecureRandom.hex})"
|
||||
|
|
Loading…
Reference in a new issue