Skip to content

Commit a8d34ca

Browse files
justin808claude
andcommitted
Add debug and logger stubs to mock options object
The HTTPX::ErrorResponse constructor may also call options.debug, options.debug?, and options.logger during error logging. Add these stubs to fully satisfy all possible method calls on the options object. This completes the mocking requirements for the integration test. 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude <[email protected]>
1 parent f728059 commit a8d34ca

File tree

1 file changed

+8
-1
lines changed

1 file changed

+8
-1
lines changed

react_on_rails_pro/spec/react_on_rails_pro/request_spec.rb

Lines changed: 8 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -247,7 +247,14 @@
247247
yielder.call("#{original_chunks[0]}\n")
248248
# Simulate connection error mid-stream by creating a mock error response
249249
# Create a minimal mock request object that satisfies the ErrorResponse constructor
250-
mock_options = instance_double(HTTPX::Options, timeout: {}, debug_level: 0)
250+
mock_options = instance_double(
251+
HTTPX::Options,
252+
timeout: {},
253+
debug_level: 0,
254+
debug: false,
255+
debug?: false,
256+
logger: nil
257+
)
251258
mock_request = instance_double(
252259
HTTPX::Request,
253260
uri: URI(render_full_url),

0 commit comments

Comments
 (0)