class RSpec::Core::ExampleGroup

Public Instance Methods

attribute(name, options = {}) click to toggle source
# File lib/inspec/rspec_extensions.rb, line 99
def attribute(name, options = {})
  Inspec.deprecate(:attrs_dsl, "Input name: #{name}, Profile: #{self.class.metadata[:profile_id]}")
  input(name, options)
end
input(input_name, options = {}) click to toggle source

This DSL method allows us to access the values of inputs within InSpec tests

# File lib/inspec/rspec_extensions.rb, line 88
def input(input_name, options = {})
  profile_id = self.class.metadata[:profile_id]
  input_with_profile_id(profile_id, input_name, options)
end
input_object(name) click to toggle source
# File lib/inspec/rspec_extensions.rb, line 94
def input_object(name)
  Inspec::InputRegistry.find_or_register_input(name, self.class.metadata[:profile_id])
end