Skip to content

Expose Request Parameters for Assertions#9

Merged
toddkummer merged 3 commits intomainfrom
expose-call-parameters
Apr 24, 2026
Merged

Expose Request Parameters for Assertions#9
toddkummer merged 3 commits intomainfrom
expose-call-parameters

Conversation

@toddkummer
Copy link
Copy Markdown
Member

This adds the following methods to the RubyLLM::Test module:

  • requests
  • last_request
  • clear_requests

These expose the parameters that were sent to the Provider, so that tests can be written against them to insure requests are made accurately.

As part of this change, the Harness class was introduced to better encapsulate the stubbed responses and the captured calls.

This also removes the next_response, responses_empty?, and responses methods from the public API, as they are for internal use.

This adds the following methods to the RubyLLM::Test module:

- requests
- last_request
- clear_requests

These expose the parameters that were sent to the Provider, so that tests can be written against them to insure requests are made accurately.

As part of this change, the Harness class was introduced to better encapsulate the stubbed responses and the captured calls.

This also removes the `next_response`, `responses_empty?`, and `responses` methods from the public API, as they are for internal use.
@toddkummer toddkummer merged commit 7783f5d into main Apr 24, 2026
19 checks passed
@toddkummer toddkummer deleted the expose-call-parameters branch May 2, 2026 17:05
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant