Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

simplify tests for AI header setting / not setting #2536

Merged
merged 1 commit into from
Mar 29, 2024

Conversation

fallwith
Copy link
Contributor

use a variable in combination with a proc to confirm the stubbed method was indeed invoked as expected or not invoked as expected.

this gives us an assertion in the non-invoked path, which is nice.

i believe this fixes (switching from -> {} to proc { |_h| } an issue to where if the raise actually was attempted in the non-invoked path, it would fail.

removed unused variables / mocks

use a variable in combination with a proc to confirm the stubbed method
was indeed invoked as expected or not invoked as expected.

this gives us an assertion in the non-invoked path, which is nice.

i believe this fixes (switching from `-> {}` to `proc { |_h| }` an issue
to where if the `raise` actually was attempted in the non-invoked path,
it would fail.

removed unused variables / mocks
Copy link
Contributor

SimpleCov Report

Coverage Threshold
Line 93.73% 93%
Branch 71.32% 71%

Copy link
Contributor

@kaylareopelle kaylareopelle left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This is wonderful! Thank you, James!

@kaylareopelle kaylareopelle merged commit 47e5771 into net-http-openai-tests Mar 29, 2024
29 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
Archived in project
Development

Successfully merging this pull request may close these issues.

2 participants