module RopenPi::Specs::ExampleHelpers

Public Instance Methods

assert_response_matches_metadata(metadata) click to toggle source
# File lib/ropen_pi/specs/example_helpers.rb, line 17
def assert_response_matches_metadata(metadata)
  RopenPi::Specs::ResponseValidator.new.validate!(metadata, response)
end
submit_request(metadata) click to toggle source
# File lib/ropen_pi/specs/example_helpers.rb, line 7
def submit_request(metadata)
  request = RopenPi::Specs::RequestFactory.new.build_request(metadata, self)
  send(
    request[:verb],
    request[:path],
    params: request[:payload],
    headers: request[:headers]
  )
end