mirror of
https://github.com/inspec/inspec
synced 2025-02-17 06:28:40 +00:00
How was value: ever working?
Signed-off-by: Clinton Wolfe <clintoncwolfe@gmail.com>
This commit is contained in:
parent
b4ae6cb342
commit
f54abf9719
2 changed files with 7 additions and 6 deletions
|
@ -35,7 +35,7 @@ module Inspec
|
|||
options[:priority] = 20
|
||||
options[:provider] = :inline_control_code
|
||||
evt = Inspec::Input.infer_event(options)
|
||||
Inspec::InputRegistry.find_or_register_input(input_name, profile_name, event: evt).value
|
||||
Inspec::InputRegistry.find_or_register_input(input_name, profile_id, event: evt).value
|
||||
end
|
||||
end
|
||||
|
||||
|
|
|
@ -65,14 +65,15 @@ end
|
|||
|
||||
class RSpec::Core::ExampleGroup
|
||||
# This DSL method allows us to access the values of inputs within InSpec tests
|
||||
def attribute(name)
|
||||
Inspec::InputRegistry.find_or_register_input(name, self.class.metadata[:profile_id]).value
|
||||
def attribute(name, options = {})
|
||||
Inspec::InputRegistry.find_or_register_input(name, self.class.metadata[:profile_id], options).value
|
||||
end
|
||||
define_example_method :attribute
|
||||
def input_obj(name)
|
||||
Inspec::InputRegistry.find_or_register_input(name, self.class.metadata[:profile_id])
|
||||
|
||||
def input_object(name, options = {})
|
||||
Inspec::InputRegistry.find_or_register_input(name, self.class.metadata[:profile_id], options)
|
||||
end
|
||||
define_example_method :input_obj
|
||||
define_example_method :input_object
|
||||
|
||||
# Here, we have to ensure our method_missing gets called prior
|
||||
# to RSpec::Core::ExampleGroup.method_missing (the class method).
|
||||
|
|
Loading…
Add table
Reference in a new issue