Skip to content

Commit 35a17c2

Browse files
committed
ew, stop calling private method in tests
1 parent d571830 commit 35a17c2

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

test/mcp/client/http_test.rb

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -30,7 +30,9 @@ def test_raises_load_error_when_faraday_not_available
3030
Http.any_instance.stubs(:require).with("faraday").raises(LoadError, "cannot load such file -- faraday")
3131

3232
error = assert_raises(LoadError) do
33-
client.send(:client) # Call the private method that triggers require_faraday!
33+
# I picked #tools arbritarily.
34+
# This should immediately try to instantiate the client and fail
35+
client.tools
3436
end
3537

3638
assert_includes(error.message, "The 'faraday' gem is required to use the MCP client HTTP transport")

0 commit comments

Comments
 (0)